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 Aston Chan <ac...@altaworks.com> on 2000/12/26 20:08:21 UTC

SocketAppender question

Hi,

I tried the Sort.java example file with sort3.lcf.  The messages did get
logged to the server process.  However, I notice that as soon as the
client is exit, there is an exception thrown on the server console:

2053 INFO  [main]      org.log4j.examples.SortAlgo.DUMP     - Element
[98]=98
2053 INFO  [main]      org.log4j.examples.SortAlgo.DUMP     - Element
[99]=99
2053 INFO  [main]               org.log4j.examples.Sort     - The next log
state
ment should be an error message.
2053 ERROR [main]      org.log4j.examples.SortAlgo.DUMP     - Tried to dump
an u
ninitialized array.
2053 INFO  [main]               org.log4j.examples.Sort     - Exiting main
metho
d.
7110 INFO  [Thread-0]              org.log4j.net.SocketNode     - Caught
java.ne
t.SocketException, will close conneciton.
java.net.SocketException: Connection reset by peer: JVM_recv in socket input
str
eam read
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.io.ObjectInputStream.peekCode(Unknown Source)
        at java.io.ObjectInputStream.refill(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at org.log4j.net.SocketNode.run(SocketNode.java:68)
        at java.lang.Thread.run(Unknown Source)

What can I do to avoid this exception?

Thanks.

-Aston

p.s. please send your answer to achan@altaworks.com


Re: SocketAppender question

Posted by Ceki Gulcu <cg...@urbanet.ch>.
Aston,

The exception is informational. (It is caught.)

If you are bothered by it for esthetic reasons, then set the priority of 
the category named  "org.log4j.net.SocketNode" to a value higher than INFO. 
Hope this helps, Ceki



At 14:08 26.12.2000 -0500, Aston Chan wrote:
>Hi,
>
>I tried the Sort.java example file with sort3.lcf.  The messages did get
>logged to the server process.  However, I notice that as soon as the
>client is exit, there is an exception thrown on the server console:
>
>2053 INFO  [main]      org.log4j.examples.SortAlgo.DUMP     - Element
>[98]=98
>2053 INFO  [main]      org.log4j.examples.SortAlgo.DUMP     - Element
>[99]=99
>2053 INFO  [main]               org.log4j.examples.Sort     - The next log
>state
>ment should be an error message.
>2053 ERROR [main]      org.log4j.examples.SortAlgo.DUMP     - Tried to dump
>an u
>ninitialized array.
>2053 INFO  [main]               org.log4j.examples.Sort     - Exiting main
>metho
>d.
>7110 INFO  [Thread-0]              org.log4j.net.SocketNode     - Caught
>java.ne
>t.SocketException, will close conneciton.
>java.net.SocketException: Connection reset by peer: JVM_recv in socket input
>str
>eam read
>         at java.net.SocketInputStream.socketRead(Native Method)
>         at java.net.SocketInputStream.read(Unknown Source)
>         at java.net.SocketInputStream.read(Unknown Source)
>         at java.io.ObjectInputStream.peekCode(Unknown Source)
>         at java.io.ObjectInputStream.refill(Unknown Source)
>         at java.io.ObjectInputStream.readObject(Unknown Source)
>         at java.io.ObjectInputStream.readObject(Unknown Source)
>         at org.log4j.net.SocketNode.run(SocketNode.java:68)
>         at java.lang.Thread.run(Unknown Source)
>
>What can I do to avoid this exception?
>
>Thanks.
>
>-Aston
>
>p.s. please send your answer to achan@altaworks.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org