I need some suggestions in terms of SLF4J logging.
Currently, we are using SLF4J logging (log4j binding) for a our Java web app, which uses the simple ConsoleAppender. Our next step is researching for places where we can save the logs.
Our app processes about 100,000 messages per day. Each message generates about 60 -100 lines of logs. Our goal is to be able to quickly search and find failed messages (using an messageId) and identify causes for the failure.
My question is: which of the following is a good place to store our logs:
Thanks.
Consider switching away from log4j and using the logback implementation of the slf4j API Logback has an extensive list of appenders available.
I think perhaps your questions is more concerning making your logs searchable. The answer depends on what you're search for.
As suggested by Sebastien there is also a Graylog2 appender for logback. Now available in Maven Central
<dependency>
<groupId>me.moocar</groupId>
<artifactId>logback-gelf</artifactId>
<version>0.9.6p2</version>
</dependency>
Of course this will depend on having a graylog2 server installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With