logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Hall" <dh...@utrs.com>
Subject RE: Dynamic log names
Date Thu, 15 Jun 2006 12:46:56 GMT
DailyRollingAppender is the option I was thinking about...
However, how do I specify a date in the name of my file?

Thanks,

Darren



-----Original Message-----
From: James Stauffer [mailto:stauffer.james@gmail.com] 
Sent: Wednesday, June 14, 2006 10:09 PM
To: Log4J Users List
Subject: Re: Dynamic log names

DailyRollingAppender will do something close to that.  Give it a try.
One difference is that the file will end with the date (not ".log")
and the current file doesn't have the date in the name.

On 6/14/06, Darren Hall <dhall@utrs.com> wrote:
> Question for everyone,
>
>
>
> I'm generating two log files, an event log and an error log using Log4j
> 1.2.13 and Struts 1.2.9 on Tomcat 5.5 on a Windows Pro dev box.
>
> Currently I'm using the FileAppender class to generate the logs.
>
>
>
> What I'd like to do is generate daily logs with a filename along the lines
> of uwaf-event.2006-05-03.log and uwaf-error.2006-05-03.log.
>
> Meaning I'd like to append the date into the name of the log file.
>
>
>
> How would I go about doing this?
>
> And do I need to use a different class to generate the log (maybe
> RollingFileAppender or DailyFileAppender)?
>
>
>
> Thanks,
>
>
>
> Darren
>
>
>


-- 
James Stauffer
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





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message