I tried to call the method close() on my asyn appender and I got this ThreadException:
"Thread exception: stat = 70008" I begin to think that even if I don't get any error msg or exception after I called xml::DOMConfigurator::configure(filename); It doesn't mean that everything is fine! When I do not instantiate the async appender, and I connect the console and file appender directly to the root logger, I have 3 threads running: wmainCRTStartup I_RpcBCacheFree StringFromGUID2 When I instantiate the async appender, I have one additional thread called: _threadstartex It makes me think that async appender was able to start his worker thread. I just don't understand why the async appender refuses to dispatch the events to the console and file appender. Can somebody help me on this? -----Original Message----- From: Stephane Hamel [mailto:[EMAIL PROTECTED] Sent: February 14, 2006 11:07 AM To: [email protected] Subject: AsyncAppender problem w/ VS8 and CVS head 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
