logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendon Co" <Brendon...@asia.bigfoot.com>
Subject RE: output file using log4j
Date Thu, 01 May 2003 06:22:25 GMT
another question, why is it the roll-over only occurd when I accessed a file that calls log4j?

Is it not automatic? I mean when it reaches 12:01pm, it should have roll-over, right? without
calling file/servlet/class that calls log4j...

-----Original Message-----
From: Ebersole, Steven [mailto:steven.ebersole@vignette.com]
Sent: Wednesday, April 30, 2003 10:28 PM
To: 'Log4J Users List'
Subject: RE: output file using log4j


log4j only uses the date pattern when rolling a file.  The current file is
_always_ named according to the File property.

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=file.txt
log4j.appender.A4.DatePattern='.'yyyy-MM-dd

This will initially produce a file named file.txt.  

During first roll-over, the file named file.txt would be renamed to
file.txt.2003-04-29.  You would now have two files:
file.txt
file.txt.2003-04-29


During the next roll-over, file file.txt.2003-04-29 would remain unchanged
(unless it exceeds the max back up index property, in which case it would be
deleted).  file.txt would be renamed to file.txt.2003-04-30.  You would now
have three files:
file.txt
file.txt.2003-04-29
file.txt.2003-04-30

HTH


-----Original Message-----
From: Brendon Co [mailto:Brendon.Co@asia.bigfoot.com]
Sent: Tuesday, April 29, 2003 11:10 PM
To: log4j-user@jakarta.apache.org
Subject: output file using log4j



I want my output to be file.2003-04-29.log
is this the right way to initialize filename?

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=file
log4j.appender.A4.DatePattern='.'yyyy-MM-dd'.txt'





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message