Your log files are rotating, but your problem is that your log files don't
have have unique names. There is currently no functionality that
removes/deletes archived log files. You will have to extend
LoggerAppenderDailyFile
appender yourself, and provide the functionality.


If you don't know how to do that, you can use this configuration to
generate hourly rotating files. Note that there will have to be some
mechanism (manually/cron) that deletes archived files.


You can easily use this configuration:


   1. <configuration xmlns="http://logging.apache.org/log4php/";>
   2. <appender name="default" class="LoggerAppenderDailyFile">
   3. <layout class="LoggerLayoutSimple" />
   4. <param name="file" value="Debug.%s.log" />
   5. <param name="datePattern" value="D.Y.m.d.H" />
   6. </appender>
   7. <root>
   8. <appender_ref ref="default" />
   9. </root>
   10. </configuration>


Notice the datePattern pattern - this pattern ensures that name of every
log file is unique and creating for specific hour and day of the year.
Result format will be
Debug.Sun.2013.10.08.15.log. There will be unique files for every file, and
the same file will never be appended again.

Reply via email to