Chainsaw V2 can receive events from a socketAppender as long as the event doesn't contain location info (line/file name/etc).
Using a pattern layout with line/file pattern causes location info to be created for the event. The easiest fix is to move the CHAINSAW_CLIENT appender configuration to the top of the file, since the ERROUT appender uses a pattern layout with line, and this modifies the event to contain location info - which will cause events to no longer be received in Chainsaw. By the way, socket appender - used by CHAINSAW_CLIENT appender config - doesn't use a pattern layout - it sends serialized logging events. In summary, CHAINSAW_CLIENT configuration should look like this and be first in the file: <appender name="CHAINSAW_CLIENT" class="org.apache.log4j.net.SocketAppender"> <param name="RemoteHost" value="localhost" /> <param name="Port" value="4445" /> </appender> Scott -----Original Message----- From: Dave [mailto:[EMAIL PROTECTED] Sent: Sun 5/1/2005 3:50 PM To: log4j-user@logging.apache.org Cc: Subject: Re: Chainsaw help The following is my config file File appender and console appender both work fine. Socket appender doesn't log anything other then DEBUG and INFO ?? Thanks Dave <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <!-- ************************************************************************************* * This xml document is used to define ACMS Log4J Configuration * ************************************************************************************** --> <log4j:configuration> <!-- ********************************************************************************* * This appender simply outputs log messages to the console * * %d - DateTime * * %t - Thread * * %C - Class * * %m - Message * * %n - New Line * ********************************************************************************** --> <appender name="ERROUT" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.Err" /> <param name="Threshold" value="WARN" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%p - %m%n%l%C" /> </layout> </appender> <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.Out" /> <param name="Threshold" value="DEBUG" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%p - %m%n" /> </layout> <filter class="org.apache.log4j.varia.LevelRangeFilter"> <param name="LevelMin" value="DEBUG" /> <param name="LevelMax" value="ERROR" /> <param name="AcceptOnMatch" value="true" /> </filter> </appender> <appender name="A2" class="org.apache.log4j.FileAppender"> <param name="File" value="c:/test.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%p - %m%n" /> </layout> </appender> <root> <priority value="DEBUG" /> <appender-ref ref="ERROUT" /> <appender-ref ref="STDOUT" /> <appender-ref ref="CHAINSAW_CLIENT" /> <appender-ref ref="A2" /> </root> </log4j:configuration> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]