Discussion:
DatePattern
Sandeep Murthy (Altrantec)
2004-08-05 17:10:38 UTC
Permalink
Hello again,

I have set the Date pattern as :
log4j.appender.R.DatePattern='.'yyyy-MM-dd-HH-mm but the logs are not getting rolled over every minute.. Its working somewhat strange, the logs getting rolled over once in a while. Sometimes after a minute, sometime after 5-6 minutes..

could this be a bug ?

thnx,

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 02-08-2004
Paul Smith
2004-08-05 21:54:35 UTC
Permalink
What is the full appender configuration information?
Rolling will only occur when a logging event is sent to the appender, it
will then check whether the file name it is about to write to matches the
date pattern, and if not, creates a new file with the timestamp of the
logging event based on the pattern.
There is no background thread automatically doing this.
So if you don't send the appender and event for 5-6 minutes, then there will
be a 5-6 minute 'gap', and no files with those minutes in the name.
Cheers,

Paul Smith
-----Original Message-----
Sent: Friday, August 06, 2004 3:11 AM
To: Log4J Users List
Subject: DatePattern
Hello again,
log4j.appender.R.DatePattern='.'yyyy-MM-dd-HH-mm but the logs are not
getting rolled over every minute.. Its working somewhat strange, the logs
getting rolled over once in a while. Sometimes after a minute, sometime
after 5-6 minutes..
could this be a bug ?
thnx,
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 02-08-2004
---------------------------------------------------------------------
Sandeep Murthy (Altrantec)
2004-08-06 08:11:50 UTC
Permalink
Hi,

Yes, I had figured as much but the problem continues... Here“s my log4j.properties:

log4j.rootCategory=debug, R

# Print only messages of priority WARN or higher for your category
log4j.category.your.category.name=DEBUG
# Specifically inherit the priority level
#log4j.category.your.category.name=INHERITED

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=F:\\bea\\user_projects\\contents\\logs\\WCM_export_

#### Date pattern for the temp log
log4j.appender.R.DatePattern=yyyy-MM-dd-HH-mm

#### Layout for Output and its conversion pattern

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%n%n%n%n%n%n%m%n


Whats happening is that the when the first time an event is generated, a log called WCM_export_ is generated and a minute later this log gets renamed as WCM_export_2004-05-08-11-55 and a new log named WCM_export_ is created. BUT from here on inspite of generating events continuously, they keep getting logged to the file WCM_export_ instead of Rolling and creating new logs called WCM_export_2004-05-08-11-56 and so on..

In short, Events are being generated continuously but the Rolling doesn't seem to function.

Thnx for any help..



-----Original Message-----
From: Paul Smith [mailto:***@aconex.com]
Sent: quinta-feira, 5 de Agosto de 2004 22:55
To: 'Log4J Users List'
Subject: RE: DatePattern

What is the full appender configuration information?
Rolling will only occur when a logging event is sent to the appender, it
will then check whether the file name it is about to write to matches the
date pattern, and if not, creates a new file with the timestamp of the
logging event based on the pattern.
There is no background thread automatically doing this.
So if you don't send the appender and event for 5-6 minutes, then there will
be a 5-6 minute 'gap', and no files with those minutes in the name.
Cheers,

Paul Smith
-----Original Message-----
Sent: Friday, August 06, 2004 3:11 AM
To: Log4J Users List
Subject: DatePattern
Hello again,
log4j.appender.R.DatePattern='.'yyyy-MM-dd-HH-mm but the logs are not
getting rolled over every minute.. Its working somewhat strange, the logs
getting rolled over once in a while. Sometimes after a minute, sometime
after 5-6 minutes..
could this be a bug ?
thnx,
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 02-08-2004
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-***@logging.apache.org
For additional commands, e-mail: log4j-user-***@logging.apache.org


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 02-08-2004


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.733 / Virus Database: 487 - Release Date: 02-08-2004
Loading...