You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2018/10/27 06:30:00 UTC

[jira] [Commented] (MEECROWAVE-156) Log4j 2 SLF4J Binding Not Working In Maven

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

Romain Manni-Bucau commented on MEECROWAVE-156:
-----------------------------------------------

Hi James, this is because maven uses slf4j too and is initialized before meecrowave. The original intent was that the plugin uses maven output for slf4j to unify it, therefore the custom classloader does not force to reload log4j when launching the app.

> Log4j 2 SLF4J Binding Not Working In Maven
> ------------------------------------------
>
>                 Key: MEECROWAVE-156
>                 URL: https://issues.apache.org/jira/browse/MEECROWAVE-156
>             Project: Meecrowave
>          Issue Type: Bug
>    Affects Versions: 1.2.4
>            Reporter: James Smith
>            Priority: Major
>
> I am using SLF4J in a Meecrowave project, and I would like to use SLF4J bindings. I have added the following dependency:
> {noformat}
> log4j-slf4j-impl{noformat}
> When I run the project from main, the provided configuration I have given (*src/main/resources/log4j2.xml*) is working with *org.slf4j.Logger*. When I run it with the meecrowave plugin, however, only the *org.apache.logging.log4j.Logger* is formatted while the *org.slf4j.Logger* is using what I believe is the default logger (only *[INFO]* is being shown). Also, in main I can run both loggers at the same time and it will output the correct format for both loggers.
>  



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