logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SCOTT FARQUHAR" <SCOTT.FARQU...@sydneywater.com.au>
Subject Re: where is the backup file
Date Tue, 03 Apr 2001 22:36:09 GMT
>From the javaDoc on RollingFileAppender:
-----------------
rollOver
public void rollOver()
Implemetns the usual roll over behaviour. 
If MaxBackupIndex is positive, then files {File.1, ..., File.MaxBackupIndex -1} are renamed
to {File.2, ..., File.MaxBackupIndex}. Moreover, File is renamed File.1 and closed. A new
File is created to receive further log output. 

If MaxBackupIndex is equal to zero, then the File is truncated with no backup files created.

----------------------------
So your backup file would be 
C:/itp/logImpl/logtest.log.1


>>> Simin.Zolfaghari@bku.db.de 04/04/01 12:36am >>>
Hi,

I have implemented a Simple class " LogImpl"  that included one Catagory  named "CAT".
I have to to specify a MaxFileSize and a Backupfile. The test-application with this Class
run correctly but I don't know where is saved my Backup file and wath is the Name of the Backupfile
.  Is it possible to specify the name of the Backupfile?
I can't find any Backup file .

the Configuration file look like.


# Set root category priority to DEBUG and its only appender to A1.
log4j.rootCategory=DEBUG, A1
  

# A1 is set to be a FileAppender which outputs to test.log. 
#log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.Append=true
log4j.appender.A1.File=C:/itp/logImpl/logtest.log
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c{1} %x - %m%n
  
log4j.appender.A1.MaxFileSize=10KB
# Keep one backup file
log4j.appender.A1.MaxBackupIndex=1

log4j.category.CAT=DEBUG



tanks,
Simin



___________________________________________________

---------------------------------------------------------------------
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


Mime
View raw message