Below is my log4j configuration
#log4j.additivity.org.apache.qpid=false log4j.rootLogger=DEBUG, console log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.threshold=DEBUG log4j.appender.console.layout.ConversionPattern=%-7p %d [%t] %c %x - %m%n log4j.logger.javax.jms=DEBUG log4j.logger.org.apache.qpid=DEBUG log4j.logger.org.apache.qpid.amqp_1_0=DEBUG log4j.logger.org.apache.qpid.amqp_1_0.jms=DEBUG
and then in code
String log4jConfigFile = System.getProperty("user.dir") + File.separator + "log4j.properties";
PropertyConfigurator.configure(log4jConfigFile);
logger.debug("this is a debug log message");
my debug message this is a debug log message
do get printed but the log messages from org.apache.qpid
are not getting printed on console
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-amqp-1-0-client-jms</artifactId>
<version>0.22</version>
</dependency>
EDIT I am a newbie in java... The logging dependencies I have added. Do I need add some setting somewhere to redirect sl4j logs to log4j??
<slf4j-version>1.6.6</slf4j-version>
<log4j-version>1.2.17</log4j-version>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
</dependency>