You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by OOMS DIRK <Ex...@siemens.be> on 2005/01/07 15:48:38 UTC

Chainsaw XMLSocketReceiver

Hello,

I just started experimenting with chainsaw and it really looks nice. However
I can't get the XMLSocketReceiver in Chainsaw to work. I started Chainsaw
via WebStart. The receiver is visible in the receiver window and when my
applications starts logging I can see some socket activity (see trace
below), but there is no tab showing up for the XMLSocketReceiver. Below is
trace and config info. Any suggestion?

Cheers,
dirk

1. An error message when chainsaw boots. In the archive I found that his
could be caused by the CLASSPATH not set properly. I believe I've set it
correct, could there be other reasons? Is it because I use WebStart?

<log4j:event
logger="org.apache.log4j.chainsaw.plugins.PluginClassLoaderFactory"
timestamp="1105085100503" sequenceNumber="3" level="ERROR"
thread="Thread-6">
<log4j:message><![CDATA[pluginDirectory cannot be null, and it must exist
and must be readable, using the normal Classloader]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="3"/>
</log4j:properties>
</log4j:event>

2. Log messages in chainsaw when my application starts logging:

<log4j:event logger="org.apache.log4j.net.XMLSocketReceiver"
timestamp="1105085505889" sequenceNumber="85" level="DEBUG"
thread="Thread-6">
<log4j:message><![CDATA[accepted socket]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="83"/>
</log4j:properties>
</log4j:event>

<log4j:event logger="org.apache.log4j.net.XMLSocketReceiver"
timestamp="1105085505889" sequenceNumber="86" level="DEBUG"
thread="Thread-6">
<log4j:message><![CDATA[socket not null - creating and starting
socketnode]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="84"/>
</log4j:properties>
</log4j:event>

<log4j:event logger="org.apache.log4j.net.XMLSocketReceiver"
timestamp="1105085505889" sequenceNumber="87" level="DEBUG"
thread="Thread-6">
<log4j:message><![CDATA[waiting to accept socket]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="85"/>
</log4j:properties>
</log4j:event>

<log4j:event logger="org.apache.log4j.net.XMLSocketNode"
timestamp="1105085516326" sequenceNumber="88" level="INFO"
thread="Thread-6">
<log4j:message><![CDATA[Caught java.net.SocketException closing
connection.]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="86"/>
</log4j:properties>
</log4j:event>

<log4j:event logger="org.apache.log4j.chainsaw.LogPanelLoggerTreeModel"
timestamp="1105085516326" sequenceNumber="89" level="DEBUG"
thread="Thread-6">
<log4j:message><![CDATA[Adding to Map
org.apache.log4j.net.XMLSocketNode]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
    <log4j:data name="log4jid" value="87"/>
</log4j:properties>
</log4j:event>

3. (Part of) config of chainsaw
   <plugin name="XMLSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver">
      <param name="decoder"
value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>
      <param name="Port" value="2222"/>
   </plugin>


4. (Part of) config of my application
  <appender name="Chainsaw" class="org.apache.log4j.net.SocketAppender">
     <param name="RemoteHost" value="localhost"/> 
     <param name="Port" value="2222"/> 
     <layout class="org.apache.log4j.xml.XMLLayout">
       <param name="LocationInfo" value="false"/>
     </layout>
  </appender>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org