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 Vishist Mandapaka <vi...@gmail.com> on 2008/07/16 18:37:45 UTC

log file rolling problem

Hi,
   We're using log4j through commons-logging framework. I'm looking at
a strange behavior where rolling of log files is not happening in
Websphere process server 6.0.2.23 version on Windows 2003/ JDK 1.4.x.
The same log4j configuration is used in Webshere portal, BEA Weblogic
and its working fine. It just with Websphere process server that I see
some strange issue. The application is loading the configuration file,
and the log file format is same as what I configured.
To rule out the possibility of permissions, I've created 10 roll over
files manually in the log directory. Strange thing is, whenever the
log file reaches its maximum size its deleting the roll-over file and
overwriting the same main log file.

I'm pasting log4j configuration here for reference. Any help would be
greatly appreciated.....

# increasing priority levels:  debug, info, warn, error, fatal
#log4j.rootLogger=ERROR, stdout, error
log4j.rootLogger=ERROR, error

# Application console logs
log4j.appender.stdout=org.
apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c - %m%n

# Debug Log
log4j.appender.debug=org.apache.log4j.RollingFileAppender
log4j.appender.debug.File=app_debug.log
log4j.appender.debug.MaxFileSize=5000KB
log4j.appender.debug.MaxBackupIndex=9
log4j.appender.debug.Threshold=DEBUG
log4j.appender.debug.layout=org.apache.log4j.PatternLayout
log4j.appender.debug.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c - %m%n

# Error Log
log4j.appender.error=org.apache.log4j.RollingFileAppender
log4j.appender.error.File=app_error.log
log4j.appender.error.MaxFileSize=5000KB
log4j.appender.error.MaxBackupIndex=9
log4j.appender.error.Threshold=ERROR
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c - %m%n

# Aplication
log4j.logger.debug.com=DEBUG, debug
#log4j.logger.error.com=ERROR, stdout, error
log4j.additivity.error.com.pwc=false
log4j.additivity.debug.com.pwc=false

# All
log4j.logger.org=FATAL
log4j.logger.net=FATAL


thanks
Vishist.

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