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

Reply via email to