For each appender defined on the event source side, you need a matching 'receiver' (defined as a 'plugin' in the configuration file) for Chainsaw to receive events from the matching appender.
See the src/config/log4j-appender-sample.xml and src/config/log4j-receiver-sample.xml files for example source and sink configurations, respectively. Configure your app to use the appenders defined in the sample appender config with: -Dlog4j.configuration=log4j-appender-sample.xml. Do the same for Chainsaw but with the receiver sample: -Dlog4j.configuration=log4j-receiver-sample.xml. ChainsawV2 is also an appender itself and the appender-sample.xml demonstrates how it can be started automatically (see the LogUI appender section in the log4j-appender-sample.xml). Two other receivers are new but sample configurations aren't provided: JDBCReceiver - works with the existing JDBCAppender XMLSocketReceiver - works with JDK1.4 socket/XML-formatted events. The jdbcreceiver example is based on mysql. See the javadoc for more information. The XMLSocketReceiver requires a 'decoder' to do the work of converting from XML conforming to a DTD to a loggingevent. Two decoders exist - one for Log4J's dtd and one for JDK1.4's dtd. Here are sample configurations for using the JDBCReceiver or XMLSocketReceiver: <plugin name="JDBCReceiver" class="org.apache.log4j.jdbc.JDBCReceiver"> <param name="refreshMillis" value="5000"/> <param name="password" value=""/> <param name="user" value="root"/> <param name="driver" value="org.gjt.mm.mysql.Driver"/> <param name="sql" value='select logger as LOGGER, timestamp as TIMESTAMP, level as LEVEL, thread as THREAD, message as MESSAGE, ndc as NDC, mdc as MDC, class as CLASS, method as METHOD, file as FILE, line as LINE, concat("{{log4japp,databaselogs,log4jmachinename,mymachine,log4jid,", COUNTER, "}}") as PROPERTIES, "" as EXCEPTION from logtable'/> <param name="URL" value="jdbc:mysql://127.0.0.1/test"/> </plugin> <plugin name="XMLSocketReceiver" class="org.apache.log4j.net.XMLSocketReceiver"> <param name="decoder" value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/> <param name="Port" value="2222"/> </plugin> We'll be documenting things more completely in the near future. Hope this helps, Scott -----Original Message----- From: Scott Heaberlin [mailto:[EMAIL PROTECTED] Sent: Wed 6/18/2003 5:18 AM To: log4j-dev Cc: Subject: Testing Chainsaw v2 I'd love to help test chainsaw v2 - Could someone outline a quick howto on getting v2 set up? I have built it and can run it via the ant build script in the sandbox, but I can't seem to figure out how to configure it. I'd like to test it using receivers, but so far I've only been able to load log files with it. How do I set it up to receive events? I'm decently familiar with v1... but "chainsaw.port" isn't used in v2. Thanks a bunch - I look forward to testing v2. My dev group loves chainsaw v1 and above all else are eager to get v2 to release stage so we can view/filter on MDC!!! Thanks a bunch, -Scott Heaberlin ===== ============================== Scott Heaberlin [EMAIL PROTECTED] [EMAIL PROTECTED] ============================== __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]