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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content