4 messages in org.apache.logging.log4j-userRE: Log4j SocketServer with Log4cxx S...
FromSent OnAttachments
Cláudia MiazakiJun 23, 2004 5:14 am 
Joha...@CERNJun 23, 2004 6:53 am 
Scott DeboyJun 23, 2004 7:28 am 
Cláudia MiazakiJun 25, 2004 11:28 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:RE: Log4j SocketServer with Log4cxx SockeAppenderActions...
From:Scott Deboy (sde@comotivsystems.com)
Date:Jun 23, 2004 7:28:11 am
List:org.apache.logging.log4j-user

(requires the latest version of log4j available from CVS):

On the log4j side, use a simplesocketserver, specifying whichever port you want
to receive java events on, and a log4j config file which includes this receiver
plugin definition (or it's properties-style equivalent):

<plugin name="Log4JXMLSocketReceiver"
class="org.apache.log4j.net.XMLSocketReceiver"> <param name="Port" value="4447"/> </plugin>

You can also configure Chainsaw v2 to use the same receiver and view events in
the UI.

Scott

-----Original Message----- From: Cláudia Miazaki [mailto:cmia@itautec-philco.com.br] Sent: Wednesday, June 23, 2004 5:14 AM To: log4@logging.apache.org Cc: cmia@itautec.com.br Subject: Log4j SocketServer with Log4cxx SockeAppender

Hi,

I'm trying to use log4j's SocketServer.java on a listening port to manage
logging events coming both from Java and C++ applications, using log4j and
log4cxx SocketAppenders, respectively. The SocketServer manages logging events
from my Java applications fine, but when it receives logging events from the C++
applications it gets the following exception:

java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(Unknown Source) ...

Is this kind of usage impossible? Log4j's SocketServer can only deal with
logging events from other Java apps?

Thanks for any help!

Best regards,

Claudia Miazaki