[logback-dev] [JIRA] Created: (LBCORE-241) Set the logback to rollover new files every x minutes
moo mik ki (JIRA)
noreply-jira at qos.ch
Thu Dec 15 08:49:14 CET 2011
Set the logback to rollover new files every x minutes
-----------------------------------------------------
Key: LBCORE-241
URL: http://jira.qos.ch/browse/LBCORE-241
Project: logback-core
Issue Type: Improvement
Components: Rolling
Affects Versions: 0.9.21
Reporter: moo mik ki
Assignee: Logback dev list
Dear dev,
I tried one of the solutions here .periodictimebasedfilenamingandtrigerringpolicy but its not working. I tried to include it in my system which the requirements requires me to create new log file every 5 minutes. Please help me with my university project. thank you.
xml :
<?xml version="1.0" encoding="UTF-8" ?>
<configuration scan="true" scanPeriod="60 seconds">
<appender name="my_appender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>F:/Logs/Server.log</File>
<encoder>
<Pattern>Server[%d{ISO8601}][%p] - %m%n</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>F:/Logs/Server-%d{yyyy-MM-dd_HH-mm-ss}.log</FileNamePattern>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.PeriodicTimeBasedFileNamingAndTriggeringPolicy">
<period>600</period>
</triggeringPolicy>
</appender>
<logger name="com.mypackage.application" level="debug" additivity="false">
<appender-ref ref="my_appender" />
</logger>
</configuration>
--
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