I have implemented my own log file using log4j for my web application. But the problem is that when I print any thing in this log file, it prints several times. Is there a loop or some iteration in the code? Can someone help me deal with this issue.
From: http://www.jajakarta.org/log4j/jakarta-log4j-1.1.3/docs/TROUBLESHOOT.html
Duplicates log4j in output.
log4j ( ), , , .
log4j . , appender n , appender n , .
, - . BasicConfigurator.configure() . , , appender System.out .
, , . , , A, , A . , A , C, C , , A , C.
- Logger . , LOG4J :
log4j.logger.com.example = ERROR, out log4j.logger.com.example.myapp = INFO, out
, com.example.myapp.MyClass , .
, Addender Additive, :
log4j.additivity.com.example.myapp = false
. http://logging.apache.org/log4j/1.2/manual.html#additivity.
- java , ( ) .
, , log4j, .. log4j.xml log4j.properties. , - .
log4j.xml
log4j.properties
, , .