Closed norrs closed 1 year ago
Use case: We want to send all log levels to our humio endpoint, and only above a provided threshold to file.
Yes, its odd, but this is what we want due to the platforms we are running our software on..
Does this make sense for you @jhannes ?
In the end this ends up probably supporting rest of the configuration provided in AbstractFilteredLogEventObserver
:
observer.foo.filter=WARN,INFO@marker=INTERESTING
observer.foo.suppressMarkers=HTTP_NOT_MODIFIED
observer.foo.requireMarker=HTTP
observer.foo.requireMdc.user=tester1|tester2
observer.foo.suppressMdc.requestPath=/status
as well.
Should it be added to FileLogEventObserver
javadoc as well? Copy/paste? I only included the .threshold
one..
And Java CI probably requires updates of some token I suppose:
@norrs Thank you for the contribution
@jhannes Let me know when you can release it.
I'm eagerly waiting to bump to the version so I can close an internal ticket to done and delivered ;-)
Release 0.4.4 is uploaded to Maven central and will soon be available 🚀
FileLogEventObserver
is quite complex and I'm not sure the functionality included matches all use cases well. It supports patterned file names (so different events can go to different files) and rotation (so that old logs will be compressed and eventually deleted). For efficiency, I'm trying to keep a number of open FileChannels and to avoid recurring errors, I've implemented a circuit breaker.
I'm open to reexamine the functionality and code structure here
This allows the user to configure a threshold on the observer to avoid logging messages to a file which is below a provided threshold.