I've gotten the embedded agent working. It is a bit messy with dependency
management. Here is a sample pom. I will add this to the documentation.
project xmlns=http://maven.apache.org/POM/4.0.0;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
Thanks Ralph. I looked at POM but could not find how to use both log4j1.2.x
and log4j2 together. I can run embedded agent code with log4j2 alone fine.
The issue is that Hadoop Mapreduce code using log4j call my PIG UDF(user
defined function) which uses log4j2. Somehow, I have to make these two
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
On Oct 19, 2012, at 9:19 AM, Zhu Wayne wrote:
Thanks
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
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
That is a good news. Could I still use log4.properties instead of JSON or
XML format?
On Fri, Oct 19, 2012 at 3:14 PM, Ralph Goers ralph.go...@dslextreme.comwrote:
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
No. I personally don't like the properties format so I've not implemented it.
Others are welcome to, of course. Even so the format would not be identical as
you no longer specify fully qualified class names in the configuration and many
of the components have different configuration