No I was testing the Log4Cxx client with both the Lockback server and the Log4j server. (just to see it the Log4j works with it)<br>(Ideally I'd like the Logback server communicate with the Log4cxx client. Is this possible?)<br>
(Basically I need Log4cxx logs along with the Logback logs intercepted by the Logback server.)<br>Both servers, the Logback's SimpleSocketServer and Log4j's ShortSicketServer are throwing an exeption below:<br><br>
2008-11-20 11:59:06,860 ERROR [Thread-0] [SocketNode.java:61] SocketNode - Could not open ObjectInputStream to Socket[addr=/<a href="http://127.0.0.1">127.0.0.1</a>,port=2580,localport=6000]<br>java.io.StreamCorruptedException: invalid stream header: 3C6C6F67<br>
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)<br> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)<br> at SocketNode.<init>(SocketNode.java:59)<br> at SimpleSocketServer.run(SimpleSocketServer.java:83)<br>
2008-11-20 11:59:06,860 INFO [Thread-0] [SimpleSocketServer.java:79] SimpleSocketServer - Waiting to accept a new client.<br>2008-11-20 11:59:06,860 ERROR [Thread-1] [SocketNode.java:96] SocketNode - Unexpected exception. Closing connection.<br>
java.lang.NullPointerException<br> at SocketNode.run(SocketNode.java:78)<br> at java.lang.Thread.run(Thread.java:619)<br>2008-11-20 11:59:06,860 DEBUG [Thread-1] [SimpleSocketServer.java:133] SimpleSocketServer - Removing SocketNode/<a href="http://127.0.0.1:2580">127.0.0.1:2580</a><br>
<br>So I'm wondering if it IS possible to make/mix these two guys. It looks like there isn't.....<br>Let me know what you think, I can send you all the files you'd need to test this.<br>Thank You<br>Greg.<br><br>
<br><div class="gmail_quote">On Thu, Nov 20, 2008 at 11:52 AM, Ceki Gulcu <span dir="ltr"><listid@qos.ch></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I did not know that log4cxx was using ShortSocketServer. Anyway, the short<br>
socket server expects (java) serialized objects which can differ from one<br>
version of log4j to another. The logback and log4j objects for logging events<br>
are not compatible. When you say that you were unsuccessful in *both* cases,<br>
what is the case other than log4cxx-->logback ?<br>
<div class="Ih2E3d"><br>
<br>
Greg Flex wrote:<br>
> Hi Ceki,<br>
> I know this isn't the right place/forum but I've noticed that the<br>
> Log4cxx is using your server called: ShortSocketServer author: Ceki Gulcu<br>
> and I'm having problems configuring it to work with Log4Cxx client.<br>
> I was trying to get the Lockback SimpleSocketServer to communicate with<br>
> Log4cxx client but I was unsuccessful too and in BOTH cases I got the<br>
> following error:<br>
> ERROR [main] org.apache.log4j.net.SocketNode (SocketNode.java:59) Could<br>
> not open ObjectInputStream to Socket[addr=/<a href="http://127.0.0.1" target="_blank">127.0.0.1</a><br>
</div>> <<a href="http://127.0.0.1" target="_blank">http://127.0.0.1</a>>,port=2336,localport=6000]<br>
<div><div></div><div class="Wj3C7c">> java.io.StreamCorruptedException: invalid stream header: 3C6C6F67<br>
> at<br>
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)<br>
> at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)<br>
> at org.apache.log4j.net.SocketNode.<init>(SocketNode.java:55)<br>
> at<br>
> org.apache.log4j.net.ShortSocketServer.main(ShortSocketServer.java:74)<br>
><br>
> I thought maybe you could help me out a little... you know more about<br>
> this than me :-)<br>
> Is it even possible to mix these two guys and have them talk to each<br>
> other?<br>
> Please let me know.<br>
> Thanks a lot.<br>
> Greg.<br>
><br>
</div></div><font color="#888888">--<br>
Ceki Gülcü<br>
Logback: The reliable, generic, fast and flexible logging framework for Java.<br>
<a href="http://logback.qos.ch" target="_blank">http://logback.qos.ch</a><br>
_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
<a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</font></blockquote></div><br>