3 Replies Latest reply on Aug 16, 2011 2:49 PM by shamik

    Using TimeBasedRollingPolicy in fuse logging

    shamik

      Hi,

       

         I'm looking to use Log4j TimeBasedRollingPolicy which rolls the log file every 24 hrs and have the option to zip it. I tried using it in the log configuration file, but looks like it doesn't support "org.apache.log4j.rolling.RollingFileAppender" package.

       

      log4j.appender.out=org.apache.log4j.rolling.RollingFileAppender

      log4j.appender.out.rollingPolicy=TimeBasedRollingPolicy

      log4j.appender.out.rollingPolicy.FileNamePattern=${karaf.data}/log/servicemix%d{yyyy-MM-dd-HH}.log

       

      Is there any way to implement this? I'm trying to avoid writing my own custom rolling appender, create a bundle and attach it as a fragment to pax logging service.

       

      Any pointer will be appreciated.

       

      Edited by: shamik on Aug 1, 2011 4:59 PM

       

      Edited by: shamik on Aug 1, 2011 5:00 PM