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 Cláudia Miazaki <cm...@itautec-philco.com.br> on 2004/06/23 14:14:25 UTC

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





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


Re: Log4j SocketServer with Log4cxx SockeAppender

Posted by "Johannes.Gutleber@CERN" <Jo...@cern.ch>.
On 6/23/04 2:14 PM, "Cláudia Miazaki" <cm...@itautec-philco.com.br>
wrote:

> 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?
You need to use a SocketXMLAppender in log4cxx and an XMLReceiver in
chainsaw for example.
Cheers
Johannes

> 
> Thanks for any help!
> 
> Best regards,
> 
> Claudia Miazaki
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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