logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viktor Bresan <vb_log4j_...@yahoo.com>
Subject Contribution - TimestampFileAppender
Date Fri, 22 Sep 2006 11:03:33 GMT

I was looking for an appender that would create the
new log file
on each start of an application, with the additional
request that the
file name must contain the current timestamp.

While I was unsuccessfully looking for the appender on
the net,
I've also found that other people search for the same

Finally, I have decided to write the appender myself.
I have tested it, it works fine, and now I am willing
to share it.

Appender is pretty simple, it is derived from
it has the additional functionality that it replaces
string from the file name with the current timestamp.

Timestamp pattern is user configured by
TimestampPattern property that
has the same choice of formats as

So, I find the solution very flexible.

I have attached the following files:


... the actual appender, simple test class and
configuration file.

I am waiting for your feedback.

Kind regards, Viktor.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
View raw message