Sebastian Oerding created LOG4J2-290:
----------------------------------------
Summary: 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 1.6.0.43
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: [email protected]
For additional commands, e-mail: [email protected]