Hi,
I'm trying to use Log4J with Glassfish in a web Application. I have a small get method that just logs the different levels.
The problem I have is that only the levels from WARN upwards are logged. INFO, DEBUG are not seen anywhere.
if I set the log4j to debug, I see all the information while log4j is loading the config going correctly. As soon as I log, however, only half the logs are written...
here the log4j.xml.
<appender name="out" class="org.apache.log4j.ConsoleAppender">
<param name="Threshold" value="DEBUG"/>
<param name ="target" value="system.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c %M - %m%n"/>
</layout>
</appender>
<logger name="ch.sbb.test" additivity="false" >
<level value="DEBUG"/>
<appender-ref ref="out"/>
</logger>
logs in the web app:
log.debug("debug message");
log.info("info message");
log.warn("warn message");
log.error("error message");
log.fatal("fatal message");
logs in the server.log:
[#|2007-07-23T13:08:06.544+0200|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=20;_ThreadName=httpSSLWorkerThread-8083-1;|2007-07-23 13:08:06,544 [httpSSLWorkerThread-8083-1] ERROR ch.sbb.test.log.LogTest doGet - error message
|#]
[#|2007-07-23T13:08:06.544+0200|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=20;_ThreadName=httpSSLWorkerThread-8083-1;|2007-07-23 13:08:06,544 [httpSSLWorkerThread-8083-1] FATAL ch.sbb.test.log.LogTest doGet - fatal message
|#]
help?
[Message sent by forum member 'granat' (granat)]
http://forums.java.net/jive/thread.jspa?messageID=227673