logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mangano, Jonathan" <Jonathan.Mang...@team.telstra.com>
Subject RE: Missing log file entries
Date Thu, 15 Sep 2005 03:29:22 GMT
I am losing log messages within (or should I say between) log files been
rolled over. The actual rolling over of log files appears to be working
fine.

To give a specific example, I can follow the logging of a thread in
"application.log.1" and get to the end of the log file. When I open the
current log file "application.log" I can no longer see the thread been
logged. It appears that in the process of rolling over, it discarded or
failed to buffer the logged messages that occurred in the time it took
to roll over and put them in the newly created log file.

We are not using a SAN at the moment but we are seeing a large time
difference between the timestamp of the last log message in the previous
log file and the first message in the current log file (Typically 3-4
minutes). I am unsure of why it takes so long perform the rollover on a
local filesystem. It might have something to do with the file size or
max number of files are maintaining in the backup. I will change the
file size as you suggest, can you recommend a "comfortable" file size?

-----Original Message-----
From: Karr, David [mailto:david.karr@wamu.net] 
Sent: Thursday, 15 September 2005 12:12 AM
To: Log4J Users List
Subject: RE: Missing log file entries


When you say that you're losing log messages, do you mean that you
appear to be missing log files, or are you simply missing log messages
within log files?  By "missing" log files, do you see things like
"..log.1", "..log.3", and "..log.4", where "..log.2" is missing?

If that's the case, are you trying to write your log messages to files
on a SAN, or some other kind of remote connection?  You might try
reducing the file size limit (the size it gets to before it rolls over).
We were seeing a very similar symptom, but when we reduced the file
size, we stopped seeing the symptom.

> -----Original Message-----
> From: Mangano, Jonathan [mailto:Jonathan.Mangano@team.telstra.com]
> Sent: Tuesday, September 13, 2005 9:53 PM
> To: log4j-user@logging.apache.org
> Subject: Missing log file entries
> 
> 
> I currently have a problem when using a
> RollingLogFileAppender that is causing us to lose log 
> messages when a log file is rolled over. I am using log4j in 
> a high volume JEE application so there is a large number of 
> log messages been written to file. I have not explicitly 
> defined buffering or immediate flush parameters in the 
> configuration so it should be using the default, which by my 
> understanding is immediateFlush = true and buffering = false. 
> I am using log4j 1.2.8.
>  
> My configuration is
>  
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=applicationLog.xml
> log4j.appender.R.Threshold=INFO log4j.appender.R.MaxFileSize=5000KB
> log4j.appender.R.MaxBackupIndex=100
> log4j.appender.R.layout=org.apache.log4j.xml.XMLLayout
>  
> Has anyone encountered this problem before and if so were you
> able find a solution?
>  
> Thanks
>  
> Jonathan
> 

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


Mime
View raw message