How do I get Apache Chainsaw oeprating based on the following chainsaw-config.xml file?

耗尽温柔 提交于 2019-12-22 18:56:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!