logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James A. N. Stauffer" <stauffer.ja...@gmail.com>
Subject Re: How to log to a "dynamic folder"
Date Thu, 17 Apr 2008 19:07:08 GMT
This will achieve that:

On Thu, Apr 17, 2008 at 1:50 PM, Hei Chan <structurechart@yahoo.com> 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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message