You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2018/11/24 06:34:00 UTC

[jira] [Resolved] (LOG4J2-2453) Missing dependency to log4j-slf4j18-impl in log4j-bom

     [ https://issues.apache.org/jira/browse/LOG4J2-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved LOG4J2-2453.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.11.2

Patch applied to release-2.x and master. Please verify and close.

> Missing dependency to log4j-slf4j18-impl in log4j-bom
> -----------------------------------------------------
>
>                 Key: LOG4J2-2453
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2453
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: SLF4J Bridge
>    Affects Versions: 2.11.1
>            Reporter: Thorsten Heit
>            Priority: Major
>             Fix For: 2.11.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> According to [https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html] there are two SLF4J to Log4j adapters provided since release 2.11.1:
>  * log4j-slf4j-impl for SLF4J 1.7.x releases or older
>  * log4j-slf4j18-impl for SLF4J 1.8.x releases or newer
> When I use the following snippet in my (corporate parent) pom.xml
> {noformat}
> <dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>org.apache.logging.log4j</groupId>
>       <artifactId>log4j-bom</artifactId>
>       <version>2.11.1</version>
>       <scope>import</scope>
>       <type>pom</type>
>     </dependency>
>   </dependencies>
> </dependencyManagement>
> {noformat}
> I can omit the version numbers in my pom.xml for the Log4J components I'm using:
> {noformat}
> (...)
> <dependency>
>   <groupId>org.apache.logging.log4j</groupId>
>   <artifactId>log4j-core</artifactId>
> </dependency>
> <dependency>
>   <groupId>org.apache.logging.log4j</groupId>
>   <artifactId>log4j-slf4j-impl</artifactId>
> </dependency>
> <dependency>
>   <groupId>org.apache.logging.log4j</groupId>
>   <artifactId>log4j-jul</artifactId>
> </dependency>
> (...)
> {noformat}
> This only works for the artifact {{log4j-slf4j-impl}}, but NOT for {{log4j-slf4j18-impl}} which isn't contained / managed in the BOM.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)