logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-290) System.out mixed up with other input streams
Date Tue, 25 Jun 2013 17:49:20 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13693195#comment-13693195

Ralph Goers commented on LOG4J2-290:

Can you provide a sample application that demonstrates this?  I'm not sure where to go with
the description you have provided.
> System.out mixed up with other input streams
> --------------------------------------------
>                 Key: LOG4J2-290
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-290
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-beta7
>         Environment: Windows 7 64 bit, Eclipse 4.2.1, java JDK
>            Reporter: Sebastian Oerding
> Hi,
> I've noticed a strange behaviour which seems to be a bug in log4j 2. Unfortunately I'm
not totally sure if the problem was caused by my code, log4j or the JDK.
> I've written my own appender which works as expected. I've have implemented some stuff
to send log events over the network (the socket appender does not fit my needs).
> I use log4j 2 to get the log events in my own appender. There I filter the events and
send them over the network using java.net.sockets.
> For unit tests I simulate a client and server in the same JVM using sockets.
> Furthermore the console appender is activated in the log4j2.xml. As the logging is done
asynchronously the client are threads awaiting log events endlessly until the whole client
is stopped.
> 1. Now, when I output something with System.out.println sometimes it seems to be forwarded
to other appenders. Soory but at the moment I lack a better description.
> 2. I had the case that something was logged on the server using LOG.debug(...) (where
LOG was my Logger instance). However this log seem to never reach my appender but it appears
at the client's socket input stream.
> Hence either the input streams got somehow mixed up or due to a mysterious reason data
written to system.out is also written to the server's socket output stream (and received on
the client) or directly written to the client's input stream.
> I would not claim that my code has no bugs (actually I found zombie threads due to this)
but I can not imagine how I should have caused such problems as I am working nowhere with
System.in / System.out besides invoking System.out.println. This problems occurred only rarely
but was reproducible.
> Unfortunately I can not provide the complete code to reproduce this problem.
> I also feel unfortunate for the vague description.
> However if you have concrete questions, I may be able to be more precise or to provide
code snippets.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

View raw message