D T created LOG4J2-2912:
---------------------------
Summary: No Warning if Lookup is defined twice in different
dependencies
Key: LOG4J2-2912
URL: https://issues.apache.org/jira/browse/LOG4J2-2912
Project: Log4j 2
Issue Type: Bug
Components: Configuration, Lookups
Affects Versions: 2.13.3
Reporter: D T
A long time ago I defined a Lookup called `event` and used it as a dependency
for other projects. Somewhen in the meantime, log4j2 added a event lookup as
well.
Now my configured pattern does not work anymore, because it uses the internal
lookup instead. However, it does not show a warning that there is already a
lookup with that name.
It is even more confusing, that if I add the related Log4j2Plugins.dat directly
to my project, it uses my Lookup instead of Log4j2's (no warnings).
I only found out about log4j2's new lookup after adding the `packages`
attribute to my log4j2.xml. Only then do I get a warning and then even twice
directly:
> 2020-08-19 10:57:12,731 main WARN Plugin [event] is already mapped to class
> org.apache.logging.log4j.core.lookup.EventLookup, ignoring class
> my.example.LogEventLookup
> 2020-08-19 10:57:13,450 main WARN Plugin [event] is already mapped to class
> org.apache.logging.log4j.core.lookup.EventLookup, ignoring class
> my.example.LogEventLookup
--
This message was sent by Atlassian Jira
(v8.3.4#803005)