问题
I have Apache chainsaw V. 2 : The following is the XML file in the java project that I'd like to monitor using Apache chainsaw .
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
<plugin name="XMLSocketReceiver" class="org.apache.log4j.net.XMLSocketReceiver">
<param name="decoder" value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>
<param name="Port" value="4000"/>
<param name="threshold" value="ALL"/>
</plugin>
<root>
<priority value="debug"/>
</root>
</log4j:configuration>
The way I understand, you connect using a Chainsaw option? For eg., when I say "File" -> "Load Rmeote Log4J file", then I get this pop-up :
回答1:
It looks like you're using the latest developer snapshot of Chainsaw, yes? If not, grab it here: http://people.apache.org/~sdeboy
The option you've selected allows you to read a java.util.logging XML-formatted log file available from a URL (http etc).
Since you want to send events from a java.util.logging configuration via a socket, you should instead use the File, Load Chainsaw configuration option, select 'Use a Chainsaw config' and browse to the Chainsaw XML config file you pasted above with the XMLSocketReceiver definition.
来源:https://stackoverflow.com/questions/14033309/how-do-i-get-apache-chainsaw-oeprating-based-on-the-following-chainsaw-config-xm