Shriver, Daniel | 8 Jul 20:55
Favicon

RE: XmlSocketReciever / Chainsaw

I took the example and filled in my values to get what I have.  Looking
at the example XMLSocketR... vs. mine I found it didn't specify a host.
So I changed mine to remove the host and got the same results.

I still don't get what the meaning of the exceptions in the chainsaw
log is (they are in the message below), or how come I have two
Receivers showing up in the GUI (if an exception is thrown during
config shouldn't the receivers not get setup...).

Any tips would be nice.

-----Original Message-----
From: Scott Deboy [mailto:sdeboy <at> comotivsystems.com] 
Sent: Tuesday, July 08, 2008 1:06 PM
To: Log4J Users List
Subject: RE: XmlSocketReciever / Chainsaw

At first glance, assuming HOST and port1 and port2 are actual values,
your configuration looks ok.

Try using the example receiver configuration provided by Chainsaw
(Welcome tab, the view example receiver configuration button on the
Welcome tab).

Scott Deboy

-----Original Message-----
From: Shriver, Daniel [mailto:dshriver <at> mitre.org] 
Sent: Tuesday, July 08, 2008 5:43 AM
To: Log4J Users List
Subject: XmlSocketReciever / Chainsaw

I'm having trouble with configuring Chainsaw.  Basically I'm trying to
get logging output from one application (that has log4j embedded in it)
and a lower level (that has java utils logging embedded in it).  So, I
have a socket receiver for the log4j stuff (and it works fine), and an
XMLSocketReciever for the java utils stuff (that does not work so far).

The Chainsaw GUI shows both receivers, yet the chainsaw log tab has
some cryptic and nasty sounding errors- "plugin directory cannot be
null, it must exist and be readable, by the normal classloader" (from
the archives this message typically happens if there is a missing jar
but I can't see what jar it is complaining about, since it shows both
receivers...).  The other error suggests that my xml chainsaw config
file is bad (but if it can't see how did it managed to define the two
receivers) "I/O error occurred while parsing xml file"

I give my config files (with host and port params written over with
generic text)

Chainsaw config side:

<log4j:configuration debug="true">

                <appender name="A2"
class="org.apache.log4j.ConsoleAppender">

<layout class="org.apache.log4j.SimpleLayout"/>

</appender>

                <plugin name="SocketReceiver"
class="org.apache.log4j.net.SocketReceiver">

<param name="Port" value="<port1>"/>

</plugin>

                <plugin name="XMLSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver">

<param name="decoder"
value="org.apache.log4j.xml.UtilLoggingXMLDecoder"/>

<param name="Host" value="<HOST>"/>

<param name="Port" value="<port2>"/>

</plugin>

                <root>

<level value="debug"/>

</root>

</log4j:configuration>

Java.utils config side:

# add your own properties for testing below, they will NOT be
overridden

atmm.debug.level=info

# not sure which one will work, remove the other one when you find out

handlers=java.util.logging.SocketHandler

java.util.logging.SocketHandler.port = <port2>

java.util.logging.SocketHandler.host = <HOST>

# Override of global logging level for this handler

java.util.logging.SocketHandler.level=ALL

# default handler is XML (what we want) thus no need to set a handler

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

Gmane