

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in org.apache.logging.log4j-userRES: Log4j SocketServer with Log4cxx ...| From | Sent On | Attachments |
|---|---|---|
| Cláudia Miazaki | Jun 23, 2004 5:14 am | |
| Joha...@CERN | Jun 23, 2004 6:53 am | |
| Scott Deboy | Jun 23, 2004 7:28 am | |
| Cláudia Miazaki | Jun 25, 2004 11:28 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RES: Log4j SocketServer with Log4cxx SockeAppender | Actions... |
|---|---|---|
| From: | Cláudia Miazaki (cmia...@itautec-philco.com.br) | |
| Date: | Jun 25, 2004 11:28:14 am | |
| List: | org.apache.logging.log4j-user | |
Hi,
Sorry to bother again, but I am a newbie to all this logging and XML as well.
I must be missing something (or maybe many things) because I can't make it work yet. Now I am using log4j v1.3-alpha from CVS and I did this sequence:
(Step 1) Activation of log4j's SimpleSocketServer with this command: java org.apache.log4j.net.SimpleSocketServer 12345 siaclog_server.xml where file "siaclog_server.xml" is attached bellow and port 12345 is not being used in my machine. The last messages shown at this point inform: INFO - Listening on port 12345 INFO - Listening on port 12345 INFO - Waiting to accept a new client INFO - Waiting to accept a new client and then it "hangs" waiting for incoming logging events.
(Step 2) Start-up the C++ application linked to log4cxx.dll (version 0.9.7). This application parses an XML configuration file called "siaclog_client.xml" (also attached) using DOMConfigurator.
At this point these errors occur at the SimpleSocketServer: ERROR - Exception opening ObjectInputStream to Socket[addr=/127.0.0.1,port=4845,localport=12345] java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(Unknown Source) ...
Another question: As will also have Java applications sending logging events to this same SimpleSocketServer, which king of appender should them use? I could not find any XMLSocketAppender at log4j.
Best regards
Claudia Miazaki
-----Mensagem original----- De: Scott Deboy [mailto:sde...@comotivsystems.com] Enviada em: quarta-feira, 23 de junho de 2004 11:29 Para: Log4J Users List; cmia...@itautec-philco.com.br Assunto: RE: Log4j SocketServer with Log4cxx SockeAppender
(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







