views:

43

answers:

2

This is the log4j.properties that i have in my app

log4j.rootLogger=B C
log4j.logger.A=INFO, A1
log4j.debug=false
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %C - %m%n

log4j.logger.B=INFO, A2
log4j.debug=false
log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.file=PRIME-log.txt
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %C - %m%n

log4j.logger.C=INFO, A3
log4j.appender.A3=org.apache.log4j.FileAppender
log4j.appender.A3.file=employee_pass_regeneration-log.txt
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%d [%t] %-5p %C - %m%n

I only want File appender so i only use that , but some how my console is always flooded with DEBUG messages which i have never used

8704 [http-8080-2] DEBUG org.springframework.web.servlet.view.JstlView - Rendering view with name 'passIndex' with model null and static attributes {}

I guess these are all system messages , but with these debug messages its really hard to debug actually i mean i cannot find my own sysouts i tried log4j.debug=false but still i get these messages

A: 

I got rid of debug messages ... in one particular file i had this

BasicConfigurator.configure();

This used to send all DEBUG messages to console

srikanth VM
A: 

First of all make sure the property files you're looking at is the one read by your application.

System.out.println(this.getClass().getClassLoader().getResource("commons-logging.properties").toString());
System.out.println(this.getClass().getClassLoader().getResource("log4.jeroen").toString());
System.out.println(this.getClass().getClassLoader().getResource("log4j.properties").toString());
System.out.println(this.getClass().getClassLoader().getResource("org/apache/log4j/Logger.class").toString());
System.out.println(this.getClass().getClassLoader().getResource("org/apache/commons/logging/Log.class").toString());

Then make sure your have the debug level in the root of your logger: log4j.rootLogger=INFO, stdout

dr jerry