Details
-
New Feature
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
We mostly use "FileAppender" and/or RollingFileAppender.
We have a debug level on certain logger just to be sure we'll be able to analyse what's goign wrong in case of an error.
This cause huge amount of logs and slow down our application.
It would be nice to combine CyclicBufferTracker (like in SMTPAppender) and FileAppender to be able to get only the n last lines before and error event occurs.
I create a POC and end up to the conclusion that 50 % performance improvement (with the last 1000 lines).
I would like to send you the POC but I can't upload here.
Sample conf :
<configuration>
<appender name="FILE" class="fr.opensagres.CyclicBufferFileAppender">
<file>testFile.log</file>
<append>true</append>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger
- %msg%n</pattern>
</encoder>
<cyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTrackerImpl">
<bufferSize>1000</bufferSize>
</cyclicBufferTracker>
</appender>
<root level="DEBUG">
<appender-ref ref="FILE" />
</root>
</configuration>
regards