activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumit Khanna <sumit.kha...@netcracker.com>
Subject Log4j.properties (for the activemq) is not behaving correctly during some failure scenarios
Date Fri, 08 Aug 2014 10:37:44 GMT
Below is my log4j.properties sample which I am using for my Test.

I have declared two variables (DATE,CURRENT_TIME) which stores some hard
coded values(see the sample). And, i am using those variables which creating
my activemq log file.

So, in the normal scenario, when I start my activemq broker, i am getting
"activemq.031856.log" and "activemq.audit.031856.log" these files generated
under /tmp/20140808 directory. This is happening as expected.

But, one day I did a start/stop/force-kill of the broker multiple times, and
i was surprized to see the file names were "activemq..log" and
"activemq.audit..log" under my /tmp directory where it should have created
under /tmp/20140808 ...

Can anyone help me out in solving this.? Whether its the wrong declaration
of the parameters in the xml ?

Any suggestions will be appreciated...

log4j.properties:
-----------------
*DATE*=20140808
*CURRENT_TIME*=031856
log4j.rootLogger=INFO, console, logfile
log4j.logger.org.apache.activemq.spring=WARN
log4j.logger.org.apache.activemq.web.handler=WARN
log4j.logger.org.springframework=WARN
log4j.logger.org.apache.xbean=WARN
log4j.logger.org.apache.camel=INFO

# Console appender
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%5p | %m%n
log4j.appender.console.threshold=INFO

# File appender
log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logfile.DatePattern=.HHMMSS
log4j.appender.logfile.file=/tmp/${*DATE*}/activemq.${*CURRENT_TIME*}.log
log4j.appender.logfile.maxFileSize=1024KB
log4j.appender.logfile.maxBackupIndex=5
log4j.appender.logfile.append=true
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n


###########
# Audit log
###########

log4j.additivity.org.apache.activemq.audit=false
log4j.logger.org.apache.activemq.audit=INFO, audit

log4j.appender.audit=org.apache.log4j.DailyRollingFileAppender
log4j.appender.audit.DatePattern=.HHMMSS
log4j.appender.audit.file=/tmp/${*DATE*}/activemq.audit.${*CURRENT_TIME*}.log
log4j.appender.audit.maxFileSize=1024KB
log4j.appender.audit.maxBackupIndex=5
log4j.appender.audit.append=true
log4j.appender.audit.layout=org.apache.log4j.PatternLayout
log4j.appender.audit.layout.ConversionPattern=%-5p | %m | %t%n



--
View this message in context: http://activemq.2283324.n4.nabble.com/Log4j-properties-for-the-activemq-is-not-behaving-correctly-during-some-failure-scenarios-tp4684304.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message