logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hei Chan <structurech...@yahoo.com>
Subject How to log to a "dynamic folder"
Date Thu, 17 Apr 2008 18:50:44 GMT
Hi,

I am like to log4j.
I just wonder whether it is possible to log a different file in a different directory based
on the hour, day, month, and year.
WhatI am trying to achieve is to log to a file at [some path]/[currentyear]/[current month]/[current
day], and the file name will be thecurrent hour.
I have looked into DailyRollingFileAppender.  Itallows me to append the time to the filename.
 But it is not exactlywhat I want.
Is there a way to configure log4j to log to a file based on the current year, month, day and
hour?
Thanks in advance.


Cheers,
Hei



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message