Apache logging services logo Apache log4j logo

Changes

Release History

VersionDateDescription
2.0-beta42012-01-28Bug fixes and enhancements
2.0-beta32012-11-11Bug fixes and enhancements
2.0-beta22012-10-07Bug fixes and enhancements
2.0-beta12012-09-18Bug fixes and enhancements
2.0-alpha22012-08-24Bug fixes and minor enhancements
2.0-alpha12012-07-29Rewrite of Log4j

Release 2.0-beta4 - 2012-01-28

TypeChangesBy

fix

LocalizedMessageTest fails on linux system. Fixes LOG4J2-156. Thanks to Andreas Born.ggregory

fix

RollingFileAppender's FileRenameAction was throwing a NullPointerException if no directory was specified on the target file name. Fixes LOG4J2-152. Thanks to Remko Popma.rgoers

fix

Convert all System.getProperty calls to use PropertiesUtil to suppress SecurityExceptions. Fixes LOG4J2-150.rgoers

fix

ThreadContextMapFilter was matching on the key instead of the value of the key. Fixes LOG4J2-147. Thanks to William Burns.rgoers

fix

Allow FlumeAvroManager to initialize even if it cannot connect to an agent.rgoers

fix

SMTPAppender will only cache filtered events. Fixes LOG4J2-149. Thanks to Scott Severtson.rgoers

fix

Add missing serial version IDs. Fixes LOG4J2-145.ggregory

fix

NullPointerException in RFC5424Layout. Fixes LOG4J2-144.ggregory

fix

MessagePatternConverter now returns "null" if the log message is null. Fixes LOG4J2-143.rgoers

fix

Serialized LogEvents were not reset in the output stream causing them to deserialize incorrectly. Fixes LOG4J2-142.rgoers

fix

Fix null pointer exception in SocketAppender if no protocol is specified. The protocol will default to TCP for the SocketAppender and UDP for the SyslogAppender. Fixes LOG4J2-139.rgoers

add

Added Log4j 2 to SLF4J adapter.rgoers

fix

Typo in documentation of SocketAppender. Fixes LOG4J2-140. Thanks to Joern Huxhorn.ggregory

fix

Fix hang in Dumbster SMTP test server. Fixes LOG4J2-137.rgoers

update

Allow newlines to be escaped in Syslog and RFC5424 layouts. Allow Throwables to be included in the output from RFC5424Layout. Fixes LOG4J2-136. Thanks to Scott Severtson.rgoers

add

Add SMTPAppender. Fixes LOG4J2-131. Thanks to Scott Severtson.rgoers

fix

PatternLayout should format throwables without requiring a converter. Fixes LOG4J2-130.rgoers

add

Added hostName and contextName to property map.rgoers

fix

BaseConfiguration does not close the first appender. Fixes LOG4J2-135. Thanks to Ingo Feltes.ggregory

add

Add MessageFormatMessage and FormattedMessage.rgoers

add

Use %red, %white, %blue, and so on in the console appender. Fixes LOG4J2-134.ggregory

add

Allow custom message creation via a message factory. Fixes LOG4J2-133.ggregory

fix

AbstractLogger.catching(Throwable) checks for DEBUG level but logs at ERROR level. Fixes LOG4J2-132.ggregory

fix

RoutingAppender was only creating a single appender for the default Route. Fixes LOG4J2-129.rgoers

fix

Allow JMS appenders to recover if the queue or topic is unavailable. Fixes LOG4J2-126.rgoers

update

Add follow attribute to Console Appender. Fixes LOG4J2-128.rgoers

fix

AbstractLogger methods were not passing Markers to the isEnabled methods. Fixes LOG4J2-127.rgoers

add

Added Flume Appender samples.rgoers

update

Add unit test to verify exceptions are thrown when the socket connection fails. Fixes LOG4J2-122.rgoers

fix

JMSQueue and JMSTopic Appenders did not allow name to be specified. Fixes LOG4J2-125.rgoers

fix

Enhanced javadoc copyright statement. Fixes LOG4J2-111.rgoers

update

Renamed log4j12-api to log4j-1.2-api. Fixes LOG4J2-110.rgoers

fix

TCPSocketManager would fail if the initial connection could not be established. Fixes LOG4J2-120.rgoers

fix

A broken socket connection would cause the TCPSocketManager to continuously reconnect. Fixes LOG4J2-119.rgoers

fix

The example for ThreadContextMapFilter was incorrect. Fixes LOG4J2-123. Thanks to Olivier Lamy.rgoers

fix

File renaming was using the wrong date value. Enhanced DefaultRolloverStrategy to store newest files in highest index as well as lowest. Fixes LOG4J2-116.rgoers

fix

ThreadContext Map elements with null values are now ignored when constructing a Flume event and in the RFC5424 Layout. Fixes LOG4J2-115.rgoers

fix

StructuredDataFilter createFilter was annotated with PluginAttr instead of PluginElement for the KeyValuePairs. Fixes LOG4J2-113.rgoers

fix

StructuredDataMessage was validating the length of the values in the event Map instead of the lengths of the keys. Fixes LOG4J2-114. Thanks to Arkin Yetis.rgoers

Release 2.0-beta3 - 2012-11-11

TypeChangesBy

fix

Fix NullPointerException in ClassLoaderContextSelector when no class is returned from the SecurityManager. Fixes LOG4J2-108.rgoers

update

Add ability to customize the names of the Levels in the LevelPatternConverter. Fixes LOG4J2-105.rgoers

fix

PatternParser was not properly handling adjacent nested options Fixes LOG4J2-107.rgoers

fix

Add support for loading plugins inside the OSGi bundle. Fixes LOG4J2-95.rgoers

update

Add ThreadContext.push(String format, Object... args) Fixes LOG4J2-85.rgoers

fix

The LogEvent was wrapping a ThrowableProxy with another ThrowableProxy when deserializing. Fixes LOG4J2-103. Thanks to Das Archive.rgoers

update

Created combined jar to combine API and Core contents for users who only want the Log4j implementation.rgoers

fix

Convert LogManager binding to use "regular" java properties instead of XML properties to workaround a bug in Oracle's xmlparserv2 jar. Fixes LOG4J2-104.rgoers

add

Added PropertiesRewritePolicy and ability to define properties on a Logger. Fixes LOG4J2-28.rgoers

update

Build pdf of user's guide. Fixes LOG4J2-87.rgoers

update

Added font and fontSize parameters to HTMLLayout. Replace newlines in message with br tag. Fixes LOG4J2-29.rgoers

add

Added ability to configure from an InputSource. Fixes LOG4J2-55.rgoers

fix

The Facility value was being improperly calculated. Fixes LOG4J2-102. Thanks to Emanuele Colombo.rgoers

fix

A NullPointerException would occur if no format value was passed to the SyslogAppender. Fixes LOG4J2-101. Thanks to Emanuele Colombo.rgoers

fix

MapRewritePolicy had an extra call to putAll that caused updates to behave like adds. Fixes LOG4J2-99. Thanks to Das Archive.rgoers

fix

Avoid NPE when duplicate LoggerContextFactorys are present. Allow factories to specify a weight to allow real implementations to outrank test implementations. Provide a simple default LoggerContextFactory.rgoers

fix

Added several missing classes and methods for Log4j 1.x compatibility. Fixes LOG4J2-97.rgoers

fix

Interpolator was not stripping Lookup key separator when trying to locate the default value for a variable. Fixes LOG4J2-94. Thanks to Denis Treskunov.rgoers

fix

Log4j 1.2 Category.forcedLog was wrapping the message with an ObjectMessage even if the parameter was an ObjectMessage.rgoers

Release 2.0-beta2 - 2012-10-07

TypeChangesBy

update

Made ParameterizedMessage, StringFormattedMessage and ThreadDumpMessage immutable. LocalizedMessage is immutable except that it will be updated with the logger name when it is added to the LogEvent.rgoers

fix

DefaultConfiguration was not starting the Console Appender.rgoers

add

Add interval and modulate options to TimeBasedTriggeringPolicy to allow more fine-grained control of when file rolling should occur. Fixes LOG4J2-35.rgoers

add

Add support for filtering packages from stack traces. Fixes LOG4J2-58.rgoers

add

If system property "disableThreadContextStack" is set pushes to the ThreadContext will be ignored. If system property "disableThreadContext" is set both puts and pushes will be ignored. Fixes LOG4J2-84.rgoers

add

If system property "disableThreadContextMap" is set puts to the ThreadContext will be ignored. If system property "disableThreadContext" is set both puts and pushes will be ignored. Fixes LOG4J2-83.rgoers

add

Add support for ANSI colors by adding the highlight and style pattern converters. Fix pattern parsing to allow nested patterns.rgoers

fix

Converted DynamicThresholdFilter to use KeyValuePair. Fixed bugs in the Map-based filters to allow declaration of multiple values for a key to match the documentation. Fixes LOG4J2-92.rgoers

fix

Many logging methods in AbstractLogger were set to an incorrect logging level. catching was using the THROWING marker and was set to debug instead of error. Fixes LOG4J2-88.rgoers

add

Allow the status logging to be directed to stderr or to a file.rgoers

fix

Log4j 1.2 adapter's Category class was missing 3 log methods. Fixes LOG4J2-91.rgoers

fix

If the ThreadContext stack is empty the LogEvent will contain a null value to reduce the overhead of creating log events and in the size of the serialized object. Changed the ThreadContext stack to use a custom stack interface instead of java.util.Stack as that class is overly heavy. This change will cause an API incompatibility. Fixes LOG4J2-84.rgoers

fix

If the ThreadContext map is empty the LogEvent will contain a null value to reduce the overhead of creating log events and in the size of the serialized object. Fixes LOG4J2-83.rgoers

add

Add getFormats to MultiformatMessage and allow StructuredDataMessage to format as XML.rgoers

fix

Add documentation on client vs server mode to performance page. Fixes LOG4J2-90.rgoers

fix

Move variable substitution from PatternLayout to appropriate converters to improve performance.rgoers

Release 2.0-beta1 - 2012-09-18

TypeChangesBy

add

Added AsynchAppender.rgoers

fix

PatternLayout was not honoring format modifiers. Fixes LOG4J-81.rgoers

fix

Created web module to allow web applications to include the Log4j context listener in WEB-INF/lib even if Log4j is in the container's class path. Allow locating the LoggerContext to include the ClassLoader. Updated the Loader utility to always choose the child ClassLoader. Verified in Jboss 5 and Tomcat.rgoers

fix

MarkerFilter called MarkerManager.getMarker causing the Marker to be created during the processing of the configuration. This prevents the application from creating the Marker with any parents. MarkerWrapper in SLF4J-impl was getting a ClassCastException in instanceOf because the Marker isn't a MarkerWrapper. Fixes LOG4J2-82.rgoers

fix

Allow Log4j 2 to be used as the implementation with SLF4J and SLF4J's jcl-over-slf4j by adding filtering to the log method in SLF4JLogger. Fixes LOG4J2-80. Thanks to Oliver Lamy.rgoers

fix

LogFactoryImpl.setAttribute in the Commons Logging bridge got a NullPointerException when passed a null value. It will now remove the attribute. Fixes LOG4J2-78.rgoers

fix

RoutingAppender was calling the stop method for each of its referenced Appenders and was calling the stop method of the default Appender a second time. It will now only call the stop method of Appenders it creates. Fixes LOG4J2-77.rgoers

fix

RewriteAppender was calling the stop method of the referenced appender causing the referenced appender's manager to have its use count decremented too many times. Fixes LOG4J2-76.rgoers

fix

Logger.error(Marker, Message, Throwable) was internally using Level.TRACE. Fixes LOG4J2-74.rgoers

fix

Enhanced Log4jContextListener to accept a configuration file location. Modified FileConfigurationMonitor to monitor files configured that way. Fixed other reconfiguration related bugs. Tested in JBoss and Tomcat. Fixes LOG4J2-75.rgoers

fix

NullPointerException in RollingFileManager when filePattern does not cause the file to be compressed. Fixes LOG4J2-72.rgoers

fix

FileRenameAction did not create the parent directories of the archive files causing the rollover to fail. Fixes LOG4J2-71.rgoers

update

Update the versions of SLF4J and Logback.rgoers

Release 2.0-alpha2 - 2012-08-24

TypeChangesBy

add

Add getLogger(Class) to LogManager. Fixes LOG4J2-70.rgoers

add

Allow Flume agents to be embedded into the Flume Appender. Fixes LOG4J2-69.rgoers

add

Add support for formatting using String.format(). Fixes LOG4J2-68.rgoers

add

Allow components besides core to create a PluginMap for faster plugin loading and not having to specify the plugin package in the configuration. Fixes LOG4J2-67.rgoers

fix

Fix compilation problems in Java 7. Fixes LOG4J2-64.rgoers

fix

Allow variable substitution on the configuration attributes and on the root log level. Fixes LOG4J2-65.rgoers

Release 2.0-alpha1 - 2012-07-29

TypeChangesBy

add

Added ability to filter on the appender-ref by adding either a level or a filter. Fixes LOG4J2-60. Thanks to Shane Kelly.rgoers

fix

Level.toLevel would throw an IllegalArgumentException instead of returning the default value. Fixes LOG4J2-56. Thanks to John Owen Atala.rgoers

fix

Remove LoggerContext support for custom logger factories. All Loggers returned by LoggerContext should be compatibile and of the same type. Fixes LOG4J2-51. Thanks to John Vasileff.rgoers

fix

Make sure all application facing log methods use their own FQCN. This patch resolves a unit test failure for the %C pattern when using the Category logger. Fixes LOG4J2-50. Thanks to John Vasileff.rgoers