Apache Logging Services
Log4j 2.10 released
The Apache Log4j 2 team is pleased to announce the Log4j 2.10 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 other modern features such as support for Markers, lambda expressions for lazy logging, property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring.
This release contains new features, bugfixes and minor enhancements. Some of the new features include support for the Java 9 module system, support for the new SLF4j 1.8 binding mechanism, simplification of the Log4j property naming scheme, and native support of Jetty's logger. Log4j API is now a fully compliant Java 9 module while the other Log4j jars are Java 9 named automatic modules.
This release supports both SLF4J 1.7.x and SLF4J 1.8.x. Because SLF4J 1.7.x requires implementations to include classes in the org.slf4j.impl package log4j-sl4j-impl cannot be used as a Java 9 module. Support for SLF4J 1.7.x will be removed in a future release.
As of Log4j 2.9.0, the Log4j API was modified to use java.util.ServiceLoader to locate Log4j implementations, although the former binding mechanism is still supported. The Log4j API jar is now a multi-release jar to provide implementations of Java 9 specific classes. Multi-release jars are not supported by the OSGi specification so OSGi modules will not be able to take advantage of these implementations but will not lose functionality as they will fall back to the implementations used in Java 7 and 8. More details on the new features and fixes are itemized below. Note that some tools are not compatible with multi-release jars and may fail trying to process class files in the META-INF/versions/9 folder. Those errors should be reported to the tool vendor.
During testing of the release it was found that one unit test fails when run on Windows. When building from source either use “
mvn clean install -DskipTests” on Windows or run the build on a different operating system. The unit test failure is a problem in the test, not in Log4j. As always, pre-built distributions can be downloaded from http://www.apache.org/dist/logging/log4j/ or the binaries jars may be obtained from the Maven central repository.
Log4j 2.9 released
The Apache Log4j 2 team is pleased to announce the Log4j 2.9 release!
This release contains the first support of Java 9 as well as bugfixes and minor enhancements. The Log4j API was modified to use java.util.ServiceLoader to locate Log4j implementations, although the former binding mechanism is still supported. The Log4j jar is now a multi-release jar to provide implementations of the Java 9 specific classes. Multi-release jars are not supported by the OSGi specification so OSGi modules will not be able to take advantage of these implementations but will not lose functionality as they will fall back to the implementations used in Java 7 and 8. More details on the new features and fixes are itemized below.
Note that subsequent to the 2.9 release, for security reasons, SerializedLayout is deprecated and no longer used as default in the Socket and JMS appenders. SerializedLayout can still be used as before, but has to be specified explicitly.[Read More]
Log4j 2.8 released
The Apache Log4j 2 team is pleased to announce the Log4j 2.8 release! This release contains several bugfixes and new features. The new features include the ability to have the RollingFileAppender log directly to the archive files, a new Apache Cassandra appender, a new ThreadContext::getThreadContextMap API method for custom ThreadContext implementations, support for variables in GelfLayout's additional fields, and support for Lookups in properties' default values. Also, this release continues the GC-free epic by updating many more filters and pattern layout converters so that they no longer allocate temporary objects during steady state logging. More details on the new features and fixes are itemized below. [Read More]
Log4j 2.7 released
The Apache Log4j 2 team is pleased to announce the Log4j 2.7 release! This release contains several bugfixes and new features. The new features include new logging API modules for Scala 2.10 and 2.11, and support for various non-blocking queue implementations in AsyncAppender. Furthermore the ThreadContext map can now be configured to be garbage-free, and users can now inject context data from other sources than ThreadContext. Context data values can be any Object, not just Strings.[Read More]
A sneak peak into Log4j 2.7
Log4j 2.7 will be released in a few days. The community is now reviewing the site and the artifacts for any last minute showstopper. Meanwhile, you may be interested in a sneak peek into what is coming.
Did you know that Log4j 2 is nominated for the JAX Innovation Awards? Vote for Log4j 2 if you like its performance, garbage-free logging, and easy and flexible configuration! Voting closes September 29th, 2016.[Read More]
Apache log4net Needs Help
This is a general call-to-arms for everyone who uses log4net as their logging solution. If log4net is the logging framework that you are using and would like to keep using in the future it is time now to get involved. The project needs a larger developing community to move on! We really need more people who want to shape the future of log4net at the Apache Software Foundation.
In all the time since log4net has been started by Nicko Cadell more than ten years ago, there have never been more than two or three people regularly contributing to it. As is normal in open source projects people have come and gone when their interests or just the amount of time they could invest have changed.
At the moment Dominik Psenner and Stefan Bodewig are the only people semi-actively working on log4net and neither of them is able to devote as much time to the project as they'd like to and as would be required.
Realistically log4net is maintenance mode where development of new features is not going to happen.
This has repeatedly made log4net lag behind recent developments in the .NET world. It took a long time to get a version out that properly worked with .NET 4.0 in 2011 and adaptions to .NET 4.5 also took much longer than many users would have wished. We are seeing it again with .NET Core right now. In addition there are many unresolved issues in log4net's JIRA.
Despite this there are more than 2500 downloads of the logging framework every day from nuget. We are asking you, the log4net community, to get your hands dirty.
Right now we are in the process of creating a log4net release that works for .NET Core. It is a very targeted effort and it is very unlikely Dominik and Stefan will be able to contribute more in the future than we did during the past months.
If you are willing to help, please join log4net's dev mailing list and raise your hand. Look through log4net's issue tracker and pick things you'd like to work on. If you don't know where to start, please ask, Dominik and Stefan will be there to help.
If there is anything holding you back from contributing, let's discuss it and get it out of the way. Nothing is carved into stone, neither what the future of log4net holds nor how we make it happen.
- log4net's JIRA
- dev mailing list
- How the ASF works
- https://www.apache.org/foundation/how-it-works.html, https://www.apache.org/dev/contributors.html
Moving on to Log4j 2: Log4j 1.2 is broken on Java 9
Log4j 1 has had a good run. First released in 1999, it is still widely used in a variety of Java-based projects. With Java 9, that is likely to come to an end: Log4j 1.2 is broken on Java 9. Essentially the MDC depends on the Java version string, which does not play well with Java 9's new version-string format.
To any project that is interested in running on Java 9, I'd strongly recommend migrating to Log4j 2 now.[Read More]
Log4j 2.6.2 released
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 other modern features such as support for Markers, lambda expressions for lazy logging, property substitution using Lookups, multiple patterns on a PatternLayout and asynchronous Loggers. Another notable Log4j 2 feature is the ability to be "garbage-free" (avoid allocating temporary objects) while logging. In addition, Log4j 2 will not lose events while reconfiguring. [Read More]
Nick Williams joined the Apache Logging PMC
We are very happy that Nick Williams joined the Apache Logging Services PMC. He is involved mainly in the development of Log4j 2.0 but also keeps an eye on Log4cxx. Thanks Nick for all what you did so far and all the best for you new role at Apache Logging.
Apache Log4j 2.0 RC1 released
The Apache Log4j 2 team is proud to announce the Log4j 2.0-rc1 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 twelfth release and first release candidate of Log4j 2 and is being made available to encourage use and feedback from the community. Rapid feedback is especially critical at this point since a general availability release is on the horizon.
Bug fixes and enhancements
This release contains several changes that break binary and backwards compatibility with previous versions. Please read the release notes correctly so that you can adjust your usage of Log4j 2, if necessary.Changes in this version include:
- LOG4J2-530: (JMX) JMX Client GUI should dynamically update when LoggerContext MBeans are registered/unregistered in MBean server.
- LOG4J2-479: ThreadContext now uses plain ThreadLocal by default, unless system property isThreadContextMapInheritable has value "true". Thanks to MK.
- LOG4J2-481: Add Stream interface to Loggers. Thanks to Matt Sicker.
- LOG4J2-482: Documentation fix: The attribute of Route to refer to an appender is "ref" not "AppenderRef". Thanks to Hongdi Ren.
- LOG4J2-467: Added option to toggle Thread name caching in AsyncLogger. Thanks to Anthony Baldocchi.
- LOG4J2-423: Added MBeans for instrumenting AsyncAppenders and AsyncLogger RingBuffers, exposing queue size, remaining capacity and other attributes.
- LOG4J2-420: Create a lookup for resource bundle substitution.
- LOG4J2-415: Format log event time as UNIX time (seconds or milliseconds).
- LOG4J2-401: Configure FileAppender buffer size.
- LOG4J2-402: Configure RandomAccessFileAppender buffer size.
- LOG4J2-500: (JMX - ObjectNames changed!) Unloading one web application unloads JMX MBeans for all web applications.
- LOG4J2-531: Fixed bugs where rolled log files were overwritten by RollingFile appender with composite time and size based policies. Thanks to Geoff Ballinger.
- LOG4J2-475: Changed the MongoDBConnection to add a MongoDB encoding hook instead of a decoding hook. Thanks to Matt Sicker.
- LOG4J2-489: Fixed the JPAAppender's overuse of transactions by connecting (borrowing from pool) on new write internal or on flush.
- LOG4J2-457: Fixed failure of JDBC and JPA appender to properly release database connections by connecting (borrowing from pool) on new write internal or on flush.
- LOG4J2-442: Fixed problem with JDBC and JPA appender connectivity in WebSphere by connecting (borrowing from pool) on new write internal or on flush.
- LOG4J2-438: Ensured the JDBCAppender commits transactions after a single write or a flush of multiple writes.
- LOG4J2-407: Fixed inability to recover from lost database connection in database appenders by connecting (borrowing from pool) on new write internal or on flush.
- LOG4J2-511: Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. Thanks to James Pretorius.
- LOG4J2-392: Stop AsyncLoggerConfig Disruptor thread(s), then AsyncAppender thread(s) first before stopping other appenders. Thanks to ilynaf, Andre Bogus.
- LOG4J2-345: (OSGi) logging.log4j-1.2-api doesn't export the log4j API 1.2. Dependent bundles can not be resolved. Thanks to Roland Weiglhofer, Matt Sicker.
- LOG4J2-523: LocalizedMessage serialization is broken.
- LOG4J2-385: Fixed issues with time-based file rollover (monthly, weekly, hourly and every minute). Thanks to Ace Funk, Porfirio Partida.
- LOG4J2-452: Added a ServletContext attribute that, when set to "true", disables Log4j's auto-initialization in Servlet 3.0+ web applications.
- LOG4J2-512: Exposed Log4j web support interface and methods and the LoggerContext through ServletContext attributes so that threads not affected by filters (such as asynchronous threads) can utilize the LoggerContext. Also updated the Log4j filter so that it supports async. Thanks to Chandra Sekhar Kakarla, Matt Sicker.
- LOG4J2-409: Created a utility to properly escape backslashes before creating URIs, and changed URI creation to use the utility instead of instantiating URI directly. Thanks to Frank Steinmann, Thomas Neidhart.
- LOG4J2-344: Changed the Servlet 3.0 auto-initializer to add the filter by class to get around a WebLogic bug. Thanks to Keir Lawson, Tomasz Wladzinski.
- LOG4J2-359: Changed the Servlet 3.0 auto-initializer so that it does nothing in a Servlet 2.5 or older application. This ensures behavioral consistency across containers. This includes additional fixes to abort initialization if a duplicate filter already exists and to check the actual Servlet EFFECTIVE version. Thanks to Abhinav Shah.
- LOG4J2-517: Switch in log4j-1.2-api Category.getEffectiveLevel has no cases for FATAL, OFF.
- LOG4J2-406: (JMX) Unregister all log4j JMX MBeans when the LoggerContext is stopped to allow web application classes to be GC-ed on undeploy. Thanks to Kerrigan Joseph.
- LOG4J2-405: Configuration was being processed twice at startup.
- LOG4J2-398: Configure properties and setup Interpolator before processing rest of configuration.
- LOG4J2-470: hostName property was not being set until after the first configuration element.
- LOG4J2-464: Support arrays as sub-elements of a JSON configuration.
- LOG4J2-492: (JMX) Fixed MalformedObjectNameException if context name contains '=' or newline characters. Thanks to Shaddy Baddah, Herlani Junior.
- LOG4J2-377: (OSGi) Fix NPE during shutdown. Thanks to Roland Weiglhofer, Matt Sicker.
- LOG4J2-463: Fixed documentation for MyApp example application in the Automatic Configuration section Thanks to Michael Diamond, Matt Sicker.
- LOG4J2-408: Fixed error in documentation code example in manual/eventlogging.html Thanks to Dongqing Hu, Matt Sicker.
- LOG4J2-451: Fixed typo in documentation: system property should be log4j2.loggerContextFactory Thanks to Vinay Pothnis, Matt Sicker.
- LOG4J2-443: Fixed issue where log4j2 LoggerContext did not show up in JMX GUI or JConsole. Thanks to Colin Froggatt, Tudor Har.
- LOG4J2-485: Fixed issue where toString methods that perform logging could deadlock AsyncAppender.
- LOG4J2-445: ResolverUtil cannot find packages in file URLs which include the '+' character. Thanks to Anthony Baldocchi.
- LOG4J2-430: Use the formatted Message in RFC5424Layout for non-StructuredDataMessages. Thanks to David Gstir.
- LOG4J2-459: Set external context when constructing the LoggerContext.
- LOG4J2-466: Cannot load log4j2 config file if path contains plus '+' characters. Thanks to Jan Tepke.
- LOG4J2-462: Fix LogEvent to never return null Level, fixes LevelPatternConverter.format may throw NPE. Thanks to Daisuke Baba.
- LOG4J2-465: Fix LogEvent to never return null Level, fixes ThresholdFilter throws NPE. Thanks to Daisuke Baba.
- LOG4J2-471: Fixed issue where toString methods that perform logging could deadlock AsyncLogger. Thanks to Anthony Baldocchi.
- LOG4J2-455: RingBufferLogEvent should return Message timestamp for TimestampMessage messages. Thanks to Robin Zhang Tao.
- LOG4J2-477: NPE in ClassLoaderContextSelector. Thanks to Tal Liron.
- LOG4J2-454: TimeBasedTriggeringPolicy should use event time millis. Thanks to Robin Zhang Tao.
- LOG4J2-472: BaseConfiguration class does not properly implement Configuration interface. Thanks to Tal Liron.
- LOG4J2-447: XMLLayout does not include marker name. Thanks to Jeff Hudren, Mark Paluch, Scott Deboy.
- LOG4J2-323: Resolved memory leak by releasing reference to ThreadLocal when AsyncLogger is stopped.
- LOG4J2-425: Resolved memory leak by populating AsyncLoggerConfigHelper ring buffer via EventTranslatorTwoArg, eliminating the need for a ThreadLocal.
- LOG4J2-417: Fix Event Level / LoggerConfig Level table at the architecture documentation page.
- LOG4J2-404: @EnterpriseNumber" was missing in the ID of structured data when RFC5424Layout is used Thanks to Kamal Bahadur.
- LOG4J2-379: Fixed issue that prevented Log4J from working in Google App Engine.
- Renamed the org.apache.logging.log4j.core.appender.db.nosql.mongo package to org.apache.logging.log4j.core.appender.db.nosql.mongodb.
- Renamed the org.apache.logging.log4j.core.appender.db.nosql.couch package to org.apache.logging.log4j.core.appender.db.nosql.couchdb.
- LOG4J2-507: Space Level numbers by 100 instead of 1.
- LOG4J2-41: Add support for custom logging levels. Thanks to Nick Williams.
- LOG4J2-490: Update EasyMock to version 3.2. Thanks to Matt Sicker.
- LOG4J2-453: Update Flume Appender to use Flume 1.4.0.
- LOG4J2-528: Rename package org.apache.logging.log4j.core.appender.rolling.helper to org.apache.logging.log4j.core.appender.rolling.action.
- LOG4J2-532: Resource leak in Flume appender when it cannot create a BerkeleyDB db.
Apache Log4j 2.0-rc1 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 group ID 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/
Apache Log4j Extras 1.2.17 released
The Apache Log4j 1 team is pleased to announce the release of Apache Log4j Extras 1.2.17.
Apache Extras™ for Apache log4j™ is a jar file full of additional functionality for log4j 1.2.x.
This release is a maintenance release.
- Version naming changed to match the required log4j version.
- RollingFileAppender with TimeBasedRolling policy doesn't create parent-path if FileNamePattern contains date pattern as directory (thanks to Daniel Stankiewicz) Fixes 53536.
- DBAppender has a compile error (thanks to Antonio Petrelli) Fixes 53645.
- Prefixed FormattingInfo and PatternParser with Extras to avoid classloading conflict
- Fixed product naming
- Removed duplicated classes (thanks to Jess Holle for spotting it)
- Removed ant build
- Made tests writing to target folder
- Merged all companions into the extras companion
- Switched Parent to Apache parent Fixes 47595.
- Upgraded to Apache Maven 3
Apache Log4j Extras 1.2.17 required Java > 1.4.2 and Log4j 1.2.17.
For more information please visit the product website: http://logging.apache.org/log4j/extras