[logback-dev] [JIRA] Commented: (LBCORE-241) Set the logback to rollover new files every x minutes
Ceki Gulcu (JIRA)
noreply-jira at qos.ch
Fri Dec 16 23:51:13 CET 2011
[ http://jira.qos.ch/browse/LBCORE-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12335#action_12335 ]
Ceki Gulcu commented on LBCORE-241:
-----------------------------------
Duplicates LBCLASSIC-298
> 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