This will achieve that:
http://stauffer.james.googlepages.com/DateFormatFileAppender.java

On Thu, Apr 17, 2008 at 1:50 PM, Hei Chan <[EMAIL PROTECTED]> wrote:
> 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



-- 
James A. N. Stauffer http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to