I have the below configuration where I want to have a log file roll over either at midnight or when the log gets to 100MB.  We are using logback version 0.9.15 at the moment.  Using the below, I'm actually not getting any logging.  Could someone help me with this?

 

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

 

 <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="RootFileAppender">

   <file>/apps/projects/liferay/logs/my-subscriptions.log</file>

   <append>true</append>

   <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

     <level>debug</level>

   </filter>

   <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

       <!-- rollover daily -->

     <fileNamePattern>/apps/projects/liferay/logs/my-subscriptions.%d{yyyy-MM-dd}.%i.log</fileNamePattern>    

     <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">

        <!-- or whenever the file size reaches 100MB -->

        <maxFileSize>100MB</maxFileSize>

      </timeBasedFileNamingAndTriggeringPolicy>

      <maxHistory>30</maxHistory>

   </rollingPolicy>  

   <layout class="ch.qos.logback.classic.PatternLayout">

      <Pattern>%date %p [%c{0}] - %message%n</Pattern>

   </layout>

 </appender>

 

 <appender class="ch.qos.logback.core.ConsoleAppender" name="RootConsoleAppender">

   <filter class="ch.qos.logback.classic.filter.ThresholdFilter">

     <level>info</level>

   </filter>

   <layout class="ch.qos.logback.classic.PatternLayout">

      <Pattern>%-4r [%t] %-5p %c %x - %m%n</Pattern>

   </layout>

 </appender>

 

 <root>

   <level value="debug"/>

   <appender-ref ref="RootFileAppender"/>

   <appender-ref ref="RootConsoleAppender"/>

 </root>

</configuration>

 

Thanks

 



Disclaimer: This e-mail message is intended only for the personal use of
the recipient(s) named above. If you are not an intended recipient, you
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete
the original message.

This e-mail expresses views only of the sender, which are not to be
attributed to Rite Aid Corporation and may not be copied or distributed
without this statement.