Thanks Scott for taking the time out to check Chainsaw v2 out. You can also configure this easily in the build.chainsaw.properties file. See the 'log4j.configuration.dir' and 'log4j.configuration' properties that are defined. Basically this causes ant to add the directory as a classpath entry, and the log4j.configuration is just the standard log4j configuration method. Works for me great.
We have a bold plan to even remove the requirement for a log4j configuration file.... Ideally you should be able to configure this via the GUI, and then ask it to save the file, and use that file from then on as a configuration... As I said, bold... (lots to do!). Paul > -----Original Message----- > From: Scott Heaberlin [mailto:[EMAIL PROTECTED] > Sent: Thursday, 19 June 2003 6:22 AM > To: Log4J Developers List > Subject: RE: Testing Chainsaw v2 > > > Thanks a ton Scott for your help. > > Just an FYI though - I was unable to get > > -Dlog4j.configuration=<some path to xml config> > > to work though. > > The only way I could get chainsaw2 to use an xml > configuration was to "cheat", rename the desired xml > file to "log4j.xml" and add its dir to the classpath > before starting Chainsaw v2. > > Just thought you'd want to know, > > -Scott > > --- Scott Deboy <[EMAIL PROTECTED]> wrote: > > 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 > > ===== > ============================== > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]