By posting your answer, you agree to the
If you have additional questions, feel free to send them here or to the log4j users mailing list, available here:
You can use a SocketAppender/SocketHubAppender on the application logging side, or a FileAppender of some kind. If you choose to use a FileAppender, Chainsaw's configuration screen can read in your application-side log4j.xml and generate the correct configuration for you.
The log4j.xml file used by the application generating the logging needs to have an 'appender' entry, not a 'receiver' entry. The Chainsaw configuration will contain a 'receiver' entry once you have it set up, which again, I would suggest doing via the configuration UI (it 'receives' events generated by an 'appender'). Just choose the option to save the config file from the configuration screen, and check the box that says 'always start Chainsaw with this configuration'
The latest developer snapshot of Chainsaw has a lot of new features, including a reworked configuration UI that should make it simpler (File, Load Chainsaw configuration menu option). You can get it here:
<priority value="debug"/>
<param name="threshold" value="ALL"/>
<param name="Port" value="4000"/>
<param name="decoder" value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>
<plugin name="XMLSocketReceiver" class="org.apache.log4j.net.XMLSocketReceiver">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
<!DOCTYPE log4j:configuration >
<?xml version="1.0" encoding="UTF-8" ?>
This is my XML file in the java project to be logged(i.e the one I want to watch in Chainsaw v2):
I'm trying to set up the Chainsaw viewer . I'm not really getting how it's supposed to work.
How do I use "Load Remote Log4J File" fucntionality of Chainsaw v2? - Stack Overflow
Комментариев нет:
Отправить комментарий