Denis Sadowski
Denis Sadowski

Reputation: 3133

Log4j DailyRollingFileAppender

I have a log file currently configured to roll over every hour. When it is first created it is called logfile.log, and once it rolls over it is renamed to logfile.log.YYYY-MM-DD-HH.

What I would like is for the log file to be created immediately using the logfile.log.YYYY-MM-DD-HH naming convention as opposed to logfile.log.

Any ideas?

Upvotes: 1

Views: 3265

Answers (1)

icyrock.com
icyrock.com

Reputation: 28598

Take a look at this post:

It discusses the use of DatedFileAppender described here:

I never used this one, but it seems to be doing exactly what you need.

Upvotes: 2

Related Questions