activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Navin Naidu <navinmna...@gmail.com>
Subject activemq Log4j usage
Date Mon, 04 Oct 2010 21:24:42 GMT
Hi,

I am facing issues configuring log4j with activemq as osgi bundle, I have
created an osgi bundle of activemq Embedded broker and has log4j.properties
file in its classpath.

It creates an empty log file, and prints the INFO on stdout (which is the
default logging behaviour).

I have also tried passing the properties file as program argument :
-Dlog4j.configuration=/home/log4j.properties

I have tried adding the properties file to the osgi bundle as well.

Is there a different way to configure log4j with osgi ?

log4j.properties:

log4j.rootLogger=INFO,DEBUG,FILE
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.file=logs/sample.log
log4j.appender.FILE.append=true
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d{ISO8601} %-5p %c{3} - %m%n
#Roll Over Every Midnight
log4j.appender.FILE.datePattern='.'yyyy-MM-dd


-- 
Thanks & Regards,

- Navin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message