How do I get Apache Chainsaw oeprating based on th

2019-05-26 14:59发布

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 : enter image description here

1条回答
趁早两清
2楼-- · 2019-05-26 15:30

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.

查看更多
登录 后发表回答