activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oli <>
Subject Logging with ActiveMQ and Log4j
Date Mon, 28 Mar 2011 13:27:02 GMT

I am currently developing a java project that is using ActiveMQ. I want to
capture the output from the ActiveMQ classes (e.g. the connector starting,
connections made and lost, messages sent and received) for logging purposes.
I am using Log4J as my logging tool in the application. 

I can not seem to find a way to capture the output and log it to file.
Adding to my project allows me to create a log file, but no
output is sent to the file.

This is my current file:

log4j.rootLogger=info, debug, logfile

# Or for more fine grained debug logging uncomment one of these

# File appender
log4j.appender.logfile.layout.ConversionPattern=%d | %-5p | %m | %c | %t%n

Using this example, a log file is created (the activemq.log file), but
nothing gets written to it.

I am also using a Log4j Logger instance in my code for general logging,
which works fine.

Is there anything I need to do in code to "activate" the logging so it can
be written out to file? Are there any changes that I need to make to the file?

I am using activemq v. 5.4.2 and log4j 1.2.16 and my project is in NetBeans.

Any help would be appreciated.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message