You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Wagner, Stefan" <Wa...@complan-und-service.de> on 2008/10/28 15:31:08 UTC

Problem with FileAppender

Hey Folk,

 

we use log4j in many JSF projects, great framework. But on one system
the FileAppender works wrong in our system...

 

Here is my test configuration:

log4j.rootLogger=warn, R

log4j.appender.R=org.apache.log4j.RollingFileAppender

log4j.appender.R.File=./logs/example.log

log4j.appender.R.MaxFileSize=10KB # sure, normally that's s****

# Keep one backup file

log4j.appender.R.MaxBackupIndex=10

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

 

I tried everything, I just get one growing file (example.log), no
example.1, example.2 etc...

Also the file logs infos, although I changed it to warn level

But the information about the file location was used, even when I
changed it. (log4j.appender.R.File)

Is this a knewn phenomenon? Or could this be a problem of my system?

 

Thanks a lot

Stefan

 

 

_____________________________________________________________________
Sitz der Gesellschaft: Viernheim

Geschaftsfuhrer: Jurgen Gerbig, Werner Oestreicher

Amtsgericht: Darmstadt, Registerabteilung: Lampertheim, HRB 61943, USt-IdNr.: DE148419070

Diese Email enthalt vertrauliche und/oder rechtlich geschutzte Informationen. Wenn Sie 
nicht der richtige Adressat sind oder diese E-Mail irrtumlich erhalten haben, informieren 
Sie bitte sofort den Absender und vernichten diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
 
This message is confidential and may contain privileged information. If you are not the
above named addressee or authorized to receive this message on behalf of the addressee,
please advise the sender immediately and delete this message. Any unauthorized copying,
disclosure or distribution of the information in this e-mail is strictly forbidden. 

Versand am 28.10.2008 15:31 von Wagner, Stefan


AW: Problem with FileAppender

Posted by "Wagner, Stefan" <Wa...@complan-und-service.de>.
Hi,

sure I use the RollingFileAppender, and on our other Servers the Mechanism works great with the same application. The log4j.properties file is evaluated, when I change the location the file is in the new destination. 

Stefan



_____________________________________________________________________
Sitz der Gesellschaft: Viernheim

Geschäftsführer: Jürgen Gerbig, Werner Oestreicher

Amtsgericht: Darmstadt, Registerabteilung: Lampertheim, HRB 61943, USt-IdNr.: DE148419070

Diese Email enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie 
nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren 
Sie bitte sofort den Absender und vernichten diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
 
This message is confidential and may contain privileged information. If you are not the
above named addressee or authorized to receive this message on behalf of the addressee,
please advise the sender immediately and delete this message. Any unauthorized copying,
disclosure or distribution of the information in this e-mail is strictly forbidden. 

Versand am 29.10.2008 09:36 von Wagner, Stefan
-----Ursprüngliche Nachricht-----
Von: Bruno Melloni [mailto:Bruno.Melloni@wnco.com] 
Gesendet: Dienstag, 28. Oktober 2008 18:14
An: Log4J Users List
Betreff: RE: Problem with FileAppender

>From your comments I think that you meant to use the RollingFileAppender
and used the FileAppender instead.  The RollingFileAppender supports
multiple files, with maximum file size and maximum number of backups.

bruno 

-----Original Message-----
From: Wagner, Stefan [mailto:Wagner@complan-und-service.de] 
Sent: Tuesday, October 28, 2008 9:31 AM
To: log4j-user@logging.apache.org
Subject: Problem with FileAppender

Hey Folk,

 

we use log4j in many JSF projects, great framework. But on one system
the FileAppender works wrong in our system...

 

Here is my test configuration:

log4j.rootLogger=warn, R

log4j.appender.R=org.apache.log4j.RollingFileAppender

log4j.appender.R.File=./logs/example.log

log4j.appender.R.MaxFileSize=10KB # sure, normally that's s****

# Keep one backup file

log4j.appender.R.MaxBackupIndex=10

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

 

I tried everything, I just get one growing file (example.log), no
example.1, example.2 etc...

Also the file logs infos, although I changed it to warn level

But the information about the file location was used, even when I
changed it. (log4j.appender.R.File)

Is this a knewn phenomenon? Or could this be a problem of my system?

 

Thanks a lot

Stefan

 

 

_____________________________________________________________________
Sitz der Gesellschaft: Viernheim

Geschaftsfuhrer: Jurgen Gerbig, Werner Oestreicher

Amtsgericht: Darmstadt, Registerabteilung: Lampertheim, HRB 61943,
USt-IdNr.: DE148419070

Diese Email enthalt vertrauliche und/oder rechtlich geschutzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.
 
This message is confidential and may contain privileged information. If
you are not the above named addressee or authorized to receive this
message on behalf of the addressee, please advise the sender immediately
and delete this message. Any unauthorized copying, disclosure or
distribution of the information in this e-mail is strictly forbidden. 

Versand am 28.10.2008 15:31 von Wagner, Stefan


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



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


RE: Problem with FileAppender

Posted by Bruno Melloni <Br...@wnco.com>.
>From your comments I think that you meant to use the RollingFileAppender
and used the FileAppender instead.  The RollingFileAppender supports
multiple files, with maximum file size and maximum number of backups.

bruno 

-----Original Message-----
From: Wagner, Stefan [mailto:Wagner@complan-und-service.de] 
Sent: Tuesday, October 28, 2008 9:31 AM
To: log4j-user@logging.apache.org
Subject: Problem with FileAppender

Hey Folk,

 

we use log4j in many JSF projects, great framework. But on one system
the FileAppender works wrong in our system...

 

Here is my test configuration:

log4j.rootLogger=warn, R

log4j.appender.R=org.apache.log4j.RollingFileAppender

log4j.appender.R.File=./logs/example.log

log4j.appender.R.MaxFileSize=10KB # sure, normally that's s****

# Keep one backup file

log4j.appender.R.MaxBackupIndex=10

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

 

I tried everything, I just get one growing file (example.log), no
example.1, example.2 etc...

Also the file logs infos, although I changed it to warn level

But the information about the file location was used, even when I
changed it. (log4j.appender.R.File)

Is this a knewn phenomenon? Or could this be a problem of my system?

 

Thanks a lot

Stefan

 

 

_____________________________________________________________________
Sitz der Gesellschaft: Viernheim

Geschaftsfuhrer: Jurgen Gerbig, Werner Oestreicher

Amtsgericht: Darmstadt, Registerabteilung: Lampertheim, HRB 61943,
USt-IdNr.: DE148419070

Diese Email enthalt vertrauliche und/oder rechtlich geschutzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtumlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist
nicht gestattet.
 
This message is confidential and may contain privileged information. If
you are not the above named addressee or authorized to receive this
message on behalf of the addressee, please advise the sender immediately
and delete this message. Any unauthorized copying, disclosure or
distribution of the information in this e-mail is strictly forbidden. 

Versand am 28.10.2008 15:31 von Wagner, Stefan


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