When does Log4J's DailyRollingFileAppender create a new file?

Solution Verified - Updated -

Issue

That is a pattern only and with that you are not saying JBoss to rollover each minute. You are asking to rollover at the midnight each day and then the file name will be domaintst.log.2009-10-15-23-59. Right?

<!-- Rollover at midnight each day -->
<param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/>

<!-- Rollover at the top of each hour
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-->

If you look these two above then you will see one is saying Rollover at midnight and other one is saying at the top of each hour(this one is commented out). Now how do you say rollover each minute or each month or each week etc?

Environment

  • Log4J

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.