Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I set my RollingFileAppender to roll every day?

Status
Not open for further replies.

Dijkstra30

Programmer
Oct 24, 2005
13
RO
I want to set my RollingFileAppender to create a new file every day, not when it reaches to a specific size.
How do i do this in log4j.properties file?

I found suggestions like this:
Code:
[COLOR=darkgreen]
log4j.appender.ROLLING.rollingPolicy=TimeBasedRollingPolicy
log4j.appender.ROLLING.rollingPolicy.FileNamePattern=%d.log
[/color]
but i get the warning :
log4j:WARN No such property [rollingPolicy] in org.apache.log4j.RollingFileAppender

Anyone knows what are the properties to be set?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top