logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Hamel" <sha...@solvision.net>
Subject AsyncAppender problem w/ VS8 and CVS head
Date Tue, 14 Feb 2006 16:06:48 GMT
Is there anybody out there that can use the Async Appender in this context:

log4cxx-0.9.8 (downloaded on Feb 3, 2006)
Compiled using VS8

I tried the following configuration:

rootLogger
 |
 +- AsyncAppender
     |
     +- Console Appender
     +- File Appender

I get no error msg, no exception. The DOM configurator simply output the
following traces in the console:

log4cxx: Threshold ="null".
log4cxx: No level could be found named "null".
log4cxx: Level value for root is [debug].
log4cxx: OptionConverter::toLevel: no class name specified, level=[debug]
log4cxx: root level set to DEBUG
log4cxx: Class name: [org.apache.log4j.AsyncAppender]
log4cxx: Attaching appender named [TEMP] to appender named [ASYNC].
log4cxx: Class name: [org.apache.log4j.FileAppender]
log4cxx: Setting option name=[File], value=[eventlog.txt]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[%d %-5p [%t]
%C{2} - %m%n]
log4cxx: Attaching appender named [CONSOLE] to appender named [ASYNC].
log4cxx: Class name: [org.apache.log4j.ConsoleAppender]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[%d %-5p [%t]
%C{2} - %m%n]
log4cxx: Adding appender named [ASYNC] to logger [root].

The logging macros seem to execute without problems, but there's no output
on the console, nor the file.

If I attach the Console Appender and the File Appender directly to the root,
it works fine. The messages are logged in the file and the console.

Here's the xml configuration file for the async appender:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">

	<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
	        <appender-ref ref="TEMP"/>
		<appender-ref ref="CONSOLE"/>
	</appender>

	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
  		     <param name="ConversionPattern" value="%d %-5p [%t] %C{2} - %m%n"/>
		</layout>
	</appender>

	<appender name="TEMP" class="org.apache.log4j.FileAppender">
		<param name="File" value="eventlog.txt"/>
		<layout class="org.apache.log4j.PatternLayout">
  		     <param name="ConversionPattern" value="%d %-5p [%t] %C{2} - %m%n"/>
		</layout>
	</appender>

	<root>
		<priority value="debug"/>
		<appender-ref ref="ASYNC"/>
	</root>
</log4j:configuration>

Thanks for your help.

Stephane Hamel
www.SolVision.net


Mime
View raw message