[logback-user] Logging from different threads

Lukas Zapletal lzap at seznam.cz
Thu Feb 26 18:50:52 CET 2009


Hello,

I have application with 4 threads called M, 1, 2 and 3. Its using Logback
over slf4j in normal way:

final static Logger logger = LoggerFactory.getLogger(TheClass.class);

I have this configuration:

<configuration>

	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>DEBUG</level>
		</filter>	
		
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>%d{HH:mm:ss} [%thread] %-5level %logger{20} - %msg%n</Pattern>
		</layout>
	</appender>
	
	<appender name="FILE" class="ch.qos.logback.core.FileAppender">
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>TRACE</level>
		</filter>	

		<File>../../build/puma-gentest1-log.txt</File>
		<Append>false</Append>
	
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>%-5level: %msg (%d{HH:mm:ss} [%thread] %logger{35}) %n</Pattern>
		</layout>
	</appender>

	<root>
		<level value="TRACE" />
		<appender-ref ref="STDOUT" />
		<appender-ref ref="FILE" />
	</root>
  
	<logger name="freemarker.cache">
		<level value="INFO" />
	</logger>
  
</configuration>

The problem: I cannot see error messages logged by one of "worker" threads.
I have no clue why. Its not from freemarker.cache package - its different
package (com.pike.blabla).

-----
--
Lukas Zapletal
http://lukas.zapletalovi.com
-- 
View this message in context: http://www.nabble.com/Logging-from-different-threads-tp22229676p22229676.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list