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 "Shriver, Daniel" <ds...@mitre.org> on 2008/07/08 14:42:41 UTC

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

 

 

 


RE: XmlSocketReciever / Chainsaw

Posted by "Shriver, Daniel" <ds...@mitre.org>.
Actually it seems to work.  I just wasn't seeing them as I expected to
since the messages from my app were dumped in one tab
("localhost.localdomain"), and the messages from another (the layer
using java utils logging) were oddly mixed into the chainsaw log tab
(which seemed to me to be internal chainsaw debugging stuff, which it
does also have in that tab).  That plus the errors in the chainsaw log
tab suggested to me I'd configured it incorrectly.  Sorry for the
trouble.

-----Original Message-----
From: Maarten Bosteels [mailto:mbosteels.dns@gmail.com] 
Sent: Wednesday, July 09, 2008 2:04 AM
To: Log4J Users List
Subject: Re: XmlSocketReciever / Chainsaw

Hi,

Which class are you using for sending (XML formatted) logging events
from
java.utils.logging to chainsaw ?

Maarten

On Tue, Jul 8, 2008 at 9:38 PM, Scott Deboy <sd...@comotivsystems.com>
wrote:

> The msgs you're seeing in the chainsaw-log tab are not errors,
they're
> letting you know that if you are using a receiver that has external
> library dependencies (vfslogfilepatternreceiver, customsqldbreceiver,
> etc), those external libraries won't be found because you don't have
a
> 'plugins' folder under $userhome/.chainsaw
>
> You have two receivers in the receivers panel - this means they were
set
> up correctly.
>
> You're not getting events most likely because the sender side
> (java.util.logging sockethandler) isn't sending events over the wire
> (you don't get a tab until events are received).
>
> You should see a socket received msg in the chainsaw-log tab when the
> java.util.logging sockethandler connects to Chainsaw.
>
> Scott Deboy
> Principal Engineer
> COMOTIV SYSTEMS
> 111 SW Columbia Street Ste. 950
> Portland, OR  97201
> Office: 503.224.7496
> Direct Line: 503.821.6482
> Cell: 503.997.1367
> Fax: 503.222.0185
> sdeboy@comotivsystems.com
> www.comotivsystems.com


Re: XmlSocketReciever / Chainsaw

Posted by Maarten Bosteels <mb...@gmail.com>.
Hi,

Which class are you using for sending (XML formatted) logging events from
java.utils.logging to chainsaw ?

Maarten

On Tue, Jul 8, 2008 at 9:38 PM, Scott Deboy <sd...@comotivsystems.com>
wrote:

> The msgs you're seeing in the chainsaw-log tab are not errors, they're
> letting you know that if you are using a receiver that has external
> library dependencies (vfslogfilepatternreceiver, customsqldbreceiver,
> etc), those external libraries won't be found because you don't have a
> 'plugins' folder under $userhome/.chainsaw
>
> You have two receivers in the receivers panel - this means they were set
> up correctly.
>
> You're not getting events most likely because the sender side
> (java.util.logging sockethandler) isn't sending events over the wire
> (you don't get a tab until events are received).
>
> You should see a socket received msg in the chainsaw-log tab when the
> java.util.logging sockethandler connects to Chainsaw.
>
> Scott Deboy
> Principal Engineer
> COMOTIV SYSTEMS
> 111 SW Columbia Street Ste. 950
> Portland, OR  97201
> Office: 503.224.7496
> Direct Line: 503.821.6482
> Cell: 503.997.1367
> Fax: 503.222.0185
> sdeboy@comotivsystems.com
> www.comotivsystems.com
>
>
> -----Original Message-----
> From: Shriver, Daniel [mailto:dshriver@mitre.org]
> Sent: Tuesday, July 08, 2008 11:55 AM
> To: Log4J Users List
> Subject: 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@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@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@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

RE: XmlSocketReciever / Chainsaw

Posted by Scott Deboy <sd...@comotivsystems.com>.
The msgs you're seeing in the chainsaw-log tab are not errors, they're
letting you know that if you are using a receiver that has external
library dependencies (vfslogfilepatternreceiver, customsqldbreceiver,
etc), those external libraries won't be found because you don't have a
'plugins' folder under $userhome/.chainsaw

You have two receivers in the receivers panel - this means they were set
up correctly.

You're not getting events most likely because the sender side
(java.util.logging sockethandler) isn't sending events over the wire
(you don't get a tab until events are received).

You should see a socket received msg in the chainsaw-log tab when the
java.util.logging sockethandler connects to Chainsaw.

Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
sdeboy@comotivsystems.com
www.comotivsystems.com


-----Original Message-----
From: Shriver, Daniel [mailto:dshriver@mitre.org] 
Sent: Tuesday, July 08, 2008 11:55 AM
To: Log4J Users List
Subject: 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@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@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@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


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


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


RE: XmlSocketReciever / Chainsaw

Posted by "Shriver, Daniel" <ds...@mitre.org>.
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@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@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@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


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


RE: XmlSocketReciever / Chainsaw

Posted by Scott Deboy <sd...@comotivsystems.com>.
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@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@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org