[logback-user] More information about log back mechanism and configuration
Roberto Pecoraro
roberto.pecoraro88 at gmail.com
Mon Feb 29 14:26:54 UTC 2016
Hi team,
I would like to reduce kairosdb traces in log files, then i need to change
the configuration in order to have limited log size and wrap around log
files.
This is my current log configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level [%file:%line] -
%msg%n</pattern>
</encoder>
</appender>
<appender name="logfile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>log/kairosdb.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>log/kairosdb.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%d{MM-dd|HH:mm:ss.SSS} [%thread] %-5level
[%file:%line] - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.mchange.v2.c3p0" level="WARN"/>
<root level="DEBUG">
<appender-ref ref="stdout"/>
<appender-ref ref="logfile"/>
</root>
</configuration>
My requirement is to have 'N' files of maximum size 'S' MB which go in
rollover, possibly leaving the first file unchanged.
Thanks and regards
Ciao
Roberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20160229/ed94449b/attachment.html>
More information about the logback-user
mailing list