-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging loop #18
Comments
Agreed. I just encountered this issue in RawSocketSender. Our log file filled up the filesystem with messages like the following: It seems like there could be several options to improve this. Any preferences, and I can create a pull request?
It also seems like the send() method could be simplified. It's currently calling flush() twice if the pending buffer is full. It seems like it might only need to call flush() once, and only if the pending buffer is full. |
I am having the same problem. RawSocketSender shouldn't have a Logger instance capable of writing logs himself otherwise it will have an infinite loop. |
If FluentLogger is used as an appender with logback (such as https://github.com/sndyuk/logback-more-appenders) then any logging by FluentLogger and related classes such as RawSocketSender can end up creating a nice little logging loop.
For instance, RawSocketSender will log "Created messages" or a message when the buffer is full... all of which get routed back into slf4j and then likely routed right back into FluentLogger for logging....
While the obvious answer is to drop any org.fluentd.logger.* messages that would end up routed to the FluentLogger appender (thereby possibly leaving them routed to other appends) that would then mask any real messages but I wonder if there is a better solution?
I don't have any ideas but figured I'd throw the problem out there and maybe someone would have a good idea.
It may also be helpful to enable some type of throttling on messages--- like if the buffer is full due to a down fluentd.
Also cross posted here: sndyuk/logback-more-appenders#2
The text was updated successfully, but these errors were encountered: