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 Ralph Goers <ra...@dslextreme.com> on 2013/06/08 20:14:06 UTC

[ANNOUNCEMENT] Apache Log4j 2.0-beta7 released

The Apache Log4j 2 team is pleased to announce the Log4j 2.0-beta7 release!

Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to
Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides
many of the improvements available in Logback while fixing some inherent problems in Logback's
architecture.

This is the ninth release of Log4j 2 and is being made available to encourage use and feedback from the community.

Bug fixes and enhancements

Changes in this version include:

New features:
o LOG4J2-10:  Break up core into multiple osgi jars. Thanks to Timothy Ward. 
o LOG4J2-229:  New JDBC, JPA, and NoSQL database Appenders. Thanks to beamerblvd. 
o LOG4J2-251:  Provide configuration information (location, content type, content if possible) via a registered Advertiser. 

Fixed Bugs:
o LOG4J2-263:  Do not allow a charset on RFC5424Layout - use UTF-8. 
o LOG4J2-242:  StringFormattedMessage and MessageFormatMessage now will accept a Throwable as their last argument and
        pass it on. 
o LOG4J2-269:  Use transaction when batch size is 1. 
o LOG4J2-268:  Add guid to FlumeEvent headers for non-Map Messages. 
o LOG4J2-246:  Data buffer is reset in finally clause. 
o LOG4J2-228:  UDP now sends one event per packet. 
o LOG4J2-261:  Add missing "not" to error message. Thanks to Edward Sargisson. 
o LOG4J2-223:  Remove LoggerContext when LoggerContext is stopped. 
o LOG4J2-260:  XML layout does not specify charset in content type. 
o LOG4J2-259:  HTML layout does not specify charset in content type. 
o LOG4J2-258:  HTML layout does not output meta element for charset. 
o LOG4J2-257:  XML layout ignores charset for the XML processing intruction's encoding attribute. 
o LOG4J2-255:  Multi-byte character strings are now assumed to be in the platform default encoding, not UTF-8. 
o LOG4J2-254:  Mark OutputStream in OutputStreamManager as volatile. Mark header and footer as final. 
o LOG4J2-244:  Rewrite Appender was ignoring filters on referenced appenders. 
o LOG4J2-245:  Avoid EmptyStack exception if getCallerClass and SecurityManager are not available. 
o LOG4J2-247:  SocketServer.isActive should be volatile because it is accessed from different threads. 

Changes:
o LOG4J2-249:  Allow context parameters in Log4jContextListener to include properties. 
o LOG4J2-243:  Allow custom LogEventFactories. 
o LOG4J2-262:  Add support for interceptors in the embedded Flume Appender. Thanks to Edward Sargisson. 
o Method name changes in interface org.apache.logging.log4j.spi.ThreadContextMap:
        getContext() to getCopy(), get() to getImmutableMapOrNull(). 
o LOG4J2-154:  Improve ThreadContext performance with copy-on-write map and stack. 


Apache Log4j 2.0-beta7 requires a minimum of Java 6 to build and run. Basic compatibility with
Log4j 1.x is provided through the log4j-1.2-api component, however it does not implement some of the
very implementation specific classes and methods. The package names and Maven groupId have been changed to
org.apache.logging.log4j to avoid any conflicts with log4j 1.x.

For complete information on Apache Log4j 2, including instructions on how to submit bug reports,
patches, or suggestions for improvement, see the Apache Apache Log4j 2 website:

http://logging.apache.org/log4j/2.x/


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


Re: [ANNOUNCEMENT] Apache Log4j 2.0-beta7 released

Posted by Jörn Huxhorn <jh...@googlemail.com>.
I reopened https://issues.apache.org/jira/browse/LOG4J2-139 for this.


On 9. Juni 2013 at 16:44:59, Jörn Huxhorn (jhuxhorn@googlemail.com) wrote:
Hey everyone.  

I just updated to beta7 and my sandbox that previously worked is now throwing up the following error upon startup:  


2013-06-09 16:31:30,630 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.SerializedLayout for element SerializedLayout  
2013-06-09 16:31:30,633 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.SocketAppender for element Socket with params(host="localhost", port="4560", protocol="null", reconnectionDelay="null", immediateFail="null", name="Socket", immediateFlush="null", suppressExceptions="null", SerializedLayout(org.apache.logging.log4j.core.layout.SerializedLayout@9d379d2), null, advertise="null", Configuration(/Users/huxi/Documents/Projects/huxi/lilith/sandbox/log4j2-sandbox/build/resources/main/log4j2.xml))  
2013-06-09 16:31:30,634 ERROR Unable to invoke method createAppender in class org.apache.logging.log4j.core.appender.SocketAppender for element Socket java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:601)  
at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:765)  
at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:529)  
at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:521)  
at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:170)  
at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:123)  
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:331)  
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:370)  
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:149)  
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:85)  
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:34)  
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:360)  
at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:319)  
at de.huxhorn.lilith.sandbox.Log4j2Sandbox.main(Log4j2Sandbox.java:43)  
Caused by: java.lang.NullPointerException  
at org.apache.logging.log4j.core.appender.SocketAppender.createAppender(SocketAppender.java:120)  
... 17 more  


My configuration looks like this:  
<?xml version="1.0" encoding="UTF-8"?>  
<configuration status="debug">  
<appenders>  
<Console name="Console" target="SYSTEM_OUT">  
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} --- %msg%n"/>  
</Console>  
<Socket name="Socket" host="localhost" port="4560">  
<SerializedLayout />  
</Socket>  
</appenders>  
<loggers>  
<root level="all">  
<appender-ref ref="Console"/>  
<appender-ref ref="Socket"/>  
</root>  
</loggers>  
</configuration>  

This is related to missing protocol attribute in the SocketAppender definition and is fixable by defining it like this:  
<Socket name="Socket" host="localhost" port="4560" protocol="TCP">  
<SerializedLayout />  
</Socket>  

But I thought that in the absence of a defined protocol, TCP was supposed to be assumed.  

Cheers,  
Jörn.  

On 8. Juni 2013 at 20:14:39, Ralph Goers (ralph.goers@dslextreme.com) wrote:  
The Apache Log4j 2 team is pleased to announce the Log4j 2.0-beta7 release!  

Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to  
Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides  
many of the improvements available in Logback while fixing some inherent problems in Logback's  
architecture.  

This is the ninth release of Log4j 2 and is being made available to encourage use and feedback from the community.  

Bug fixes and enhancements  

Changes in this version include:  

New features:  
o LOG4J2-10: Break up core into multiple osgi jars. Thanks to Timothy Ward.  
o LOG4J2-229: New JDBC, JPA, and NoSQL database Appenders. Thanks to beamerblvd.  
o LOG4J2-251: Provide configuration information (location, content type, content if possible) via a registered Advertiser.  

Fixed Bugs:  
o LOG4J2-263: Do not allow a charset on RFC5424Layout - use UTF-8.  
o LOG4J2-242: StringFormattedMessage and MessageFormatMessage now will accept a Throwable as their last argument and  
pass it on.  
o LOG4J2-269: Use transaction when batch size is 1.  
o LOG4J2-268: Add guid to FlumeEvent headers for non-Map Messages.  
o LOG4J2-246: Data buffer is reset in finally clause.  
o LOG4J2-228: UDP now sends one event per packet.  
o LOG4J2-261: Add missing "not" to error message. Thanks to Edward Sargisson.  
o LOG4J2-223: Remove LoggerContext when LoggerContext is stopped.  
o LOG4J2-260: XML layout does not specify charset in content type.  
o LOG4J2-259: HTML layout does not specify charset in content type.  
o LOG4J2-258: HTML layout does not output meta element for charset.  
o LOG4J2-257: XML layout ignores charset for the XML processing intruction's encoding attribute.  
o LOG4J2-255: Multi-byte character strings are now assumed to be in the platform default encoding, not UTF-8.  
o LOG4J2-254: Mark OutputStream in OutputStreamManager as volatile. Mark header and footer as final.  
o LOG4J2-244: Rewrite Appender was ignoring filters on referenced appenders.  
o LOG4J2-245: Avoid EmptyStack exception if getCallerClass and SecurityManager are not available.  
o LOG4J2-247: SocketServer.isActive should be volatile because it is accessed from different threads.  

Changes:  
o LOG4J2-249: Allow context parameters in Log4jContextListener to include properties.  
o LOG4J2-243: Allow custom LogEventFactories.  
o LOG4J2-262: Add support for interceptors in the embedded Flume Appender. Thanks to Edward Sargisson.  
o Method name changes in interface org.apache.logging.log4j.spi.ThreadContextMap:  
getContext() to getCopy(), get() to getImmutableMapOrNull().  
o LOG4J2-154: Improve ThreadContext performance with copy-on-write map and stack.  


Apache Log4j 2.0-beta7 requires a minimum of Java 6 to build and run. Basic compatibility with  
Log4j 1.x is provided through the log4j-1.2-api component, however it does not implement some of the  
very implementation specific classes and methods. The package names and Maven groupId have been changed to  
org.apache.logging.log4j to avoid any conflicts with log4j 1.x.  

For complete information on Apache Log4j 2, including instructions on how to submit bug reports,  
patches, or suggestions for improvement, see the Apache Apache Log4j 2 website:  

http://logging.apache.org/log4j/2.x/  


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

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


Re: [ANNOUNCEMENT] Apache Log4j 2.0-beta7 released

Posted by Jörn Huxhorn <jh...@googlemail.com>.
Hey everyone.

I just updated to beta7 and my sandbox that previously worked is now throwing up the following error upon startup:


2013-06-09 16:31:30,630 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.SerializedLayout for element SerializedLayout
2013-06-09 16:31:30,633 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.SocketAppender for element Socket with params(host="localhost", port="4560", protocol="null", reconnectionDelay="null", immediateFail="null", name="Socket", immediateFlush="null", suppressExceptions="null", SerializedLayout(org.apache.logging.log4j.core.layout.SerializedLayout@9d379d2), null, advertise="null", Configuration(/Users/huxi/Documents/Projects/huxi/lilith/sandbox/log4j2-sandbox/build/resources/main/log4j2.xml))
2013-06-09 16:31:30,634 ERROR Unable to invoke method createAppender in class org.apache.logging.log4j.core.appender.SocketAppender for element Socket java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.logging.log4j.core.config.BaseConfiguration.createPluginObject(BaseConfiguration.java:765)
	at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:529)
	at org.apache.logging.log4j.core.config.BaseConfiguration.createConfiguration(BaseConfiguration.java:521)
	at org.apache.logging.log4j.core.config.BaseConfiguration.doConfigure(BaseConfiguration.java:170)
	at org.apache.logging.log4j.core.config.BaseConfiguration.start(BaseConfiguration.java:123)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:331)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:370)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:149)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:85)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:34)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:360)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:319)
	at de.huxhorn.lilith.sandbox.Log4j2Sandbox.main(Log4j2Sandbox.java:43)
Caused by: java.lang.NullPointerException
	at org.apache.logging.log4j.core.appender.SocketAppender.createAppender(SocketAppender.java:120)
	... 17 more


My configuration looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="debug">
	<appenders>
		<Console name="Console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} --- %msg%n"/>
		</Console>
		<Socket name="Socket" host="localhost" port="4560">
			<SerializedLayout />
		</Socket>
	</appenders>
	<loggers>
		<root level="all">
			<appender-ref ref="Console"/>
			<appender-ref ref="Socket"/>
		</root>
	</loggers>
</configuration>

This is related to missing protocol attribute in the SocketAppender definition and is fixable by defining it like this:
<Socket name="Socket" host="localhost" port="4560" protocol="TCP">
	<SerializedLayout />
</Socket>

But I thought that in the absence of a defined protocol, TCP was supposed to be assumed.

Cheers,
Jörn.

On 8. Juni 2013 at 20:14:39, Ralph Goers (ralph.goers@dslextreme.com) wrote:
The Apache Log4j 2 team is pleased to announce the Log4j 2.0-beta7 release!  

Apache log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to  
Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides  
many of the improvements available in Logback while fixing some inherent problems in Logback's  
architecture.  

This is the ninth release of Log4j 2 and is being made available to encourage use and feedback from the community.  

Bug fixes and enhancements  

Changes in this version include:  

New features:  
o LOG4J2-10: Break up core into multiple osgi jars. Thanks to Timothy Ward.  
o LOG4J2-229: New JDBC, JPA, and NoSQL database Appenders. Thanks to beamerblvd.  
o LOG4J2-251: Provide configuration information (location, content type, content if possible) via a registered Advertiser.  

Fixed Bugs:  
o LOG4J2-263: Do not allow a charset on RFC5424Layout - use UTF-8.  
o LOG4J2-242: StringFormattedMessage and MessageFormatMessage now will accept a Throwable as their last argument and  
pass it on.  
o LOG4J2-269: Use transaction when batch size is 1.  
o LOG4J2-268: Add guid to FlumeEvent headers for non-Map Messages.  
o LOG4J2-246: Data buffer is reset in finally clause.  
o LOG4J2-228: UDP now sends one event per packet.  
o LOG4J2-261: Add missing "not" to error message. Thanks to Edward Sargisson.  
o LOG4J2-223: Remove LoggerContext when LoggerContext is stopped.  
o LOG4J2-260: XML layout does not specify charset in content type.  
o LOG4J2-259: HTML layout does not specify charset in content type.  
o LOG4J2-258: HTML layout does not output meta element for charset.  
o LOG4J2-257: XML layout ignores charset for the XML processing intruction's encoding attribute.  
o LOG4J2-255: Multi-byte character strings are now assumed to be in the platform default encoding, not UTF-8.  
o LOG4J2-254: Mark OutputStream in OutputStreamManager as volatile. Mark header and footer as final.  
o LOG4J2-244: Rewrite Appender was ignoring filters on referenced appenders.  
o LOG4J2-245: Avoid EmptyStack exception if getCallerClass and SecurityManager are not available.  
o LOG4J2-247: SocketServer.isActive should be volatile because it is accessed from different threads.  

Changes:  
o LOG4J2-249: Allow context parameters in Log4jContextListener to include properties.  
o LOG4J2-243: Allow custom LogEventFactories.  
o LOG4J2-262: Add support for interceptors in the embedded Flume Appender. Thanks to Edward Sargisson.  
o Method name changes in interface org.apache.logging.log4j.spi.ThreadContextMap:  
getContext() to getCopy(), get() to getImmutableMapOrNull().  
o LOG4J2-154: Improve ThreadContext performance with copy-on-write map and stack.  


Apache Log4j 2.0-beta7 requires a minimum of Java 6 to build and run. Basic compatibility with  
Log4j 1.x is provided through the log4j-1.2-api component, however it does not implement some of the  
very implementation specific classes and methods. The package names and Maven groupId have been changed to  
org.apache.logging.log4j to avoid any conflicts with log4j 1.x.  

For complete information on Apache Log4j 2, including instructions on how to submit bug reports,  
patches, or suggestions for improvement, see the Apache Apache Log4j 2 website:  

http://logging.apache.org/log4j/2.x/  


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

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