I'm running some java processes on Windows 2003 server R2 I'm using Apache log4j-1.2.8. All my processes called via one jar file with different parameter example
java -jar process.jar one
java -jar process.jar two
java -jar process.jar three
And I config log4j.properties follow
#===============================
# Declare Variables
#===============================
logpath=${user.dir}/log/
simple_pattern=%d{yyyy-MM-dd HH:mm:ss.SSS}%-5x - %m%n
backup_pattern='.'yyyy-MM-dd
#===============================
# PROCESS & STANDARD OUTPUT
#===============================
log4j.logger.process.Process=NULL,proclog,procstdout
log4j.appender.proclog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.proclog.File=${logpath}process.log
log4j.appender.proclog.DatePattern=${backup_pattern}
log4j.appender.proclog.layout=org.apache.log4j.PatternLayout
log4j.appender.proclog.layout.conversionPattern=${simple_pattern}
log4j.appender.procstdout=org.apache.log4j.ConsoleAppender
log4j.appender.procstdout.layout=org.apache.log4j.PatternLayout
log4j.appender.procstdout.layout.ConversionPattern=${simple_pattern}
#===============================
# ONE
#===============================
log4j.logger.process.log.One=NULL,one
log4j.appender.one=org.apache.log4j.DailyRollingFileAppender
log4j.appender.one.File=${logpath}one.log
log4j.appender.one.DatePattern=${backup_pattern}
log4j.appender.one.layout=org.apache.log4j.PatternLayout
log4j.appender.one.layout.conversionPattern=${simple_pattern}
#===============================
# TWO
#===============================
log4j.logger.process.log.Two=NULL,two
log4j.appender.two=org.apache.log4j.DailyRollingFileAppender
log4j.appender.two.File=${logpath}two.log
log4j.appender.two.DatePattern=${backup_pattern}
log4j.appender.two.layout=org.apache.log4j.PatternLayout
log4j.appender.two.layout.conversionPattern=${simple_pattern}
#===============================
# THREE
#===============================
log4j.logger.process.log.Three=NULL,three
log4j.appender.three=org.apache.log4j.DailyRollingFileAppender
log4j.appender.three.File=${logpath}three.log
log4j.appender.three.DatePattern=${backup_pattern}
log4j.appender.three.layout=org.apache.log4j.PatternLayout
log4j.appender.three.layout.conversionPattern=${simple_pattern}
first time I use process appender is single logger and now i separate it to ONE, TWO and THREE logger. my processes executed by windows schedule every 1 minute.
So. I got Big problem I don't know why log4j cannot generate backup files. but when I execute manual by command line It's Ok.