[logback-dev] [JIRA] Created: (LBCORE-217) CyclicBufferFileAppender

Pascal Leclercq (JIRA) noreply-jira at qos.ch
Thu Aug 4 17:13:51 CEST 2011


CyclicBufferFileAppender
------------------------

                 Key: LBCORE-217
                 URL: http://jira.qos.ch/browse/LBCORE-217
             Project: logback-core
          Issue Type: New Feature
          Components: Appender
            Reporter: Pascal Leclercq
            Assignee: Logback dev list


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{35} - %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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list