The log4j 1.x adapter should allow an application that logs using log4j 1.x to run unchanged but log via log4j 2. However, the adapter has been updated since the beta2 release to contain more methods and classes that an application might use to configure log4j 1.x. Most of these will be no-ops.
With the various adapters that are available you should be able to route all logging that uses SLF4J, Log4j 1.x or Commons Logging into Log4j 2. Integration with java.util.logging has not been done yet, primarily because both ways to do it kind of suck. That said, if you were to use the jul to SLF4J bridge even those would flow to Log4j 2 via the SLF4J binding. Ralph On Oct 19, 2012, at 1:05 PM, Zhu Wayne wrote: > Thanks for the clarification. Does the adapter enable no code change on > the existing application code using log4j 1.2.x logging? Moreover, does it > mean that I can use both log4j and log4j2 to log via log4j2 implementation > in my application code? > > On Fri, Oct 19, 2012 at 11:52 AM, Ralph Goers > <ralph.go...@dslextreme.com>wrote: > >> As shown below, the log4j12-api jar replaces log4j.jar and passes all the >> Log4j 1.x logging calls to Log4j 2. This is usually what is wanted. >> >> If you still want the "real" log4j 1.x then leave log4j.jar and remove >> log4j12-api.jar. >> >> Ralph >> --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org