logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "K Sunil" <ksu...@novell.com>
Subject TImeBasedRollingPolicy behaviour
Date Wed, 31 Aug 2005 12:35:21 GMT



Hi All, 
  
          I am using Log4j 1.3 alpha build for the development. 
          In this build, I tried to use TimeBasedRollingPolicy, set 
below properties 
  
          TimeBasedRollingPolicy f = new TimeBasedRollingPolicy(); 
          f.setActiveFileName(rolling.txt); 
          f.setFileNamePattern(rolling.%d.zip); 
          f.activateOptions(); 
              
          then setRollingPolicy to RollingFileAppender object. 
  
         r = new RollingFileAppender(); 
         r.setRollingPolicy(f); 
         r.setLayout(s); 
          r.activateOptions();         
  
         I am observing different behaviour i.e 
         I am run the program it logs to rolling.txt file 
         Now I change the system time to one day more and rerun the same
program. 
  
         Behaviour observed:  It is not rolling the file, instead it is
appended to the same rolling.txt file 
  
         Expected behaviour: Should roll up the file with the date
appended to file Name. 
  
  
         Please let me know if I have missed any setting or Is the
behaviour as I am observing? 
  
               
  
Thanks and Regards, 
Sunil.K 
  
               
  
              


Mime
View raw message