[logback-user] Problems with logback rotation of logs (using with LSC-Project)
Massimo Ciancio
massimo.ciancio at itech.it
Tue Oct 18 21:01:36 UTC 2016
Hello to all,
I have problems with log rotation.
Using the configuration for debugging in logback.xml but my lsc.log do not rotate.
I run LSC 2.1 ( lsc-2.1.3-0.el5.noarch) with Java:
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
and permissions in the /var/log/lsc seem correct:
drwxr-xr-x 2 lsc lsc 4.0K Sep 29 11:42 .
drwxr-xr-x. 10 root root 4.0K Sep 27 23:58 ..
-rw-r--r-- 1 lsc lsc 157K Sep 29 15:23 lsc.ldif
-rw-r--r-- 1 lsc lsc 5.1G Sep 29 22:55 lsc.log (5.1 GB!!!)
-rw-r--r-- 1 lsc lsc 480 Sep 29 17:48 lsc.status
Can you help me?
thanks in advance
regards
-----Logback.xml-----
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- Standard output to console -->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.lsc.utils.output.LdifLayout">
<Pattern>%date{MMM dd HH:mm:ss} - %-5level - %message%n</Pattern>
</layout>
</encoder>
</appender>
<!-- Log all application messages -->
<!-- this file is rotated every 10000KB, compressed and 7 files are kept for history -->
<appender name="LSC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/lsc/lsc.log</file>
<layout class="org.lsc.utils.output.LdifLayout">
<Pattern>%date{MMM dd HH:mm:ss} - %-5level - %message%n</Pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>lsc.log.%i.gz</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>7</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10000KB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- Log for status (to use with check_lsc_status_file.pl -->
<!-- this file is erased at each execution -->
<appender name="LSC_STATUS" class="ch.qos.logback.core.FileAppender">
<append>false</append>
<file>/var/log/lsc/lsc.status</file>
<layout class="org.lsc.utils.output.LdifLayout">
<Pattern>%date{MMM dd HH:mm:ss} - %-5level - %message%n</Pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!-- Special logger to have a LDIF file of all modifications applied -->
<!-- this file is rotated every 10000KB, compressed and 7 files are kept for history -->
<appender name="LDIF" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/lsc/lsc.ldif</file>
<layout class="org.lsc.utils.output.LdifLayout">
<Pattern>%m%n</Pattern>
<onlyLdif>true</onlyLdif>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>lsc.ldif.%i.gz</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>7</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10000KB</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- Main LSC messages -->
<logger name="org.lsc" level="DEBUG">
<appender-ref ref="LSC"/>
<appender-ref ref="LSC_STATUS"/>
</logger>
<!-- Messages for LDIF output -->
<logger name="lsc" level="INFO">
<appender-ref ref="LDIF"/>
</logger>
<!-- Other messages -->
<logger name="communicationLogger" level="WARN">
<appender-ref ref="CONSOLE"/>
</logger>
<logger name="org.apache" level="WARN">
<appender-ref ref="CONSOLE"/>
</logger>
<logger name="poolLogger" level="WARN">
<appender-ref ref="CONSOLE"/>
</logger>
<!-- Root logger -->
<root level="WARN">
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
--- EOF ---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20161018/c67d305b/attachment.html>
More information about the logback-user
mailing list