[log4j] Best of both RollingFileAppender and DailyRollingFileAppender?

S

stephan

Hi,

since I'm new to log4j I'm curious whether there is a mixture of
RollingFileAppender and DailyRollingFileAppender.

What I need is the following: a FileAppender rolling over the log file
when a specific size limit is reached and renaming the current file by
extending the filename with a timestamp, e. g. "_20060206_144500".

We run a site with several peaks and several lows, so the
DailyRollingFileAppender with a rolling interval of "every hour" is not
preferred. We have hours with heavy load and therefore many log lines,
so a size limited roll-over seems more reasonable to us. But the
RollingFileAppender extends the filename with a sequence number - and
more worse: existing log files are renumbered over and over again.
Definitely not good...

So, is there a mixture of both to achieve what we want: a
*RollingFileAppender that can be controlled by log file size limits and
which renames the files with the current timestamp?

Any hint/source is appreciated!

TIA,
Stephan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top