logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Daniels (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-177) ERROR StatusLogger An exception occurred processing Appender udpsocket java.lang.NullPointerException
Date Fri, 15 Mar 2013 21:20:13 GMT
Aaron Daniels created LOG4J2-177:
------------------------------------

             Summary: ERROR StatusLogger An exception occurred processing Appender udpsocket
java.lang.NullPointerException
                 Key: LOG4J2-177
                 URL: https://issues.apache.org/jira/browse/LOG4J2-177
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.0-beta4
            Reporter: Aaron Daniels


This seems to be a race condition of some kind. Two threads are exiting at almost exactly
the same time, and both print a message as they exit. This exception happens every 3 or 4
times the code is run, so it's easily reproducible.

ERROR StatusLogger An exception occurred processing Appender udpsocket java.lang.NullPointerException
	at org.apache.logging.log4j.core.net.DatagramOutputStream.flush(DatagramOutputStream.java:93)
	at org.apache.logging.log4j.core.appender.OutputStreamManager.flush(OutputStreamManager.java:146)
	at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:117)
	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:102)
	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:335)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:316)
	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:281)
	at org.apache.logging.log4j.core.Logger.log(Logger.java:108)
	at org.apache.logging.log4j.spi.AbstractLogger.trace(AbstractLogger.java:250)
	at com.galmont.automation.framework.gui.handlers.RunCycleHandler$2.run(RunCycleHandler.java:128)
	at java.lang.Thread.run(Unknown Source)

My configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF">
	
	<appenders>
		<Console name="console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
		</Console>
		<Socket name="udpsocket" host="localhost" port="90" protocol="UDP">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
		</Socket>
		<RollingFile name="RollingFile" fileName="logs/app.log" filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
			<Policies>
				<SizeBasedTriggeringPolicy size="20 MB" />
			</Policies>
		</RollingFile>
	</appenders>
	
	<loggers>
		<root level="trace">
			<appender-ref ref="console" />
			<appender-ref ref="udpsocket" />
			<appender-ref ref="RollingFile" />
		</root>
	</loggers>
	
</configuration>

--
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


Mime
View raw message