logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-937) log4j to log4j2 ThreadContext (MDC)
Date Wed, 21 Jan 2015 17:39:35 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-937?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285944#comment-14285944
] 

Gary Gregory edited comment on LOG4J2-937 at 1/21/15 5:39 PM:
--------------------------------------------------------------

Did you remove the log4j 1 jar file from the class path?

Log4j2 has a 1.2 to 2 bridge where the 1.2 API is implemented in terms of the v2 core.

You'll need:
- log4j-1.2-api
- log4j-api
- log4j-core


was (Author: garydgregory):
Did you remove the log4j 1 jar file from the class path?

Log4j2 has a 1.2 to 2 bridge where the 1.2 API is implemented in terms of the v2 core.

> log4j to log4j2 ThreadContext (MDC)
> -----------------------------------
>
>                 Key: LOG4J2-937
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-937
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API, Core, log4j 1.2 emulation
>    Affects Versions: 2.1
>         Environment: tested on Windows XP and 7
>            Reporter: CEM DAYANIK
>
> We are using slf4j and log4j2. Also a third party library using log4j via its config
file, so we have added log4j to log4j2 adaptor.
> While using MDC or directly ThreadContext, 3.party library logs (which is using log4j)
doesnt pick up "context key" and directed to default route.
> 3.party library have a loggerfactory class name in its config file.
> Loggerfactory implementation is pretty straight forward, it creates a logger from repository.
(log4j)
> I have written another class, creates the logger from LoggerFactory (log4j2) and change
3.party properties file. Everything works fine in this case.
> So it seems the problem isnt about 3.party library but log4j to log4j2 adaptor.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message