You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2015/06/05 10:29:01 UTC
[jira] [Comment Edited] (MNG-5836) logging config is overwritten by
$M2_HOME/lib/ext/*.jar
[ https://issues.apache.org/jira/browse/MNG-5836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574120#comment-14574120 ]
Michael Osipov edited comment on MNG-5836 at 6/5/15 8:28 AM:
-------------------------------------------------------------
I think it is correct. Because logging should be bootstrapped very before the first caller tries to access it. Consider that some lib in {{$maven.home/lib/*.jar}} would like to log but the log config is not yet available. That would probably fail.
Regardless of this, I would stick to the same answer I have given on [stack overflow|http://stackoverflow.com/a/7107934/696632] almost four years ago:
bq. You never provide a log implementation. The client application has to do so. Otherwhise this would be a violation of separation of concerns. Don't do any assumptions about an unknown client.
Logging and its configuration is solely the task of the client and not a dependency. Everything else is problem.
bq. For example, if conf/logging is the first entry, the logging library could provide default configuration, which the user would still be able override through explicit configuration.
We have provisioned the {{conf/logging}} directory for that, didn't we? We never expect someone to put a {{logback.xml}} into {{ext}}.
If one of your {{ext}} JARs has {{simplelogger.properties}}, file an issue and have that fixed. I'd rather see Maven issue a warning, if that is possible, indicating the problem.
was (Author: michael-o):
I think it is correct. Because logging should be bootstrapped very before the first caller tries to access it. Consider that some lib in {{${maven.home}/lib/*.jar}} would like to log but the log config is not yet available. That would probably fail.
Regardless of this, I would stick to the same answer I have given on [stack overflow|http://stackoverflow.com/a/7107934/696632] almost four years ago:
> You never provide a log implementation. The client application has to do so. Otherwhise this would be a violation of separation of concerns. Don't do any assumptions about an unknown client.
Logging and its configuration is solely the task of the client and not a dependency. Everything else is problem.
> For example, if conf/logging is the first entry, the logging library could provide default configuration, which the user would still be able override through explicit configuration.
We have provisioned the {{conf/logging}} directory for that, didn't we? We never expect someone to put a {{logback.xml}} into {{ext}}.
If one of your {{ext}} JARs has {{simplelogger.properties}}, file an issue and have that fixed. I'd rather see Maven issue a warning, if that is possible, indicating the problem.
> logging config is overwritten by $M2_HOME/lib/ext/*.jar
> -------------------------------------------------------
>
> Key: MNG-5836
> URL: https://issues.apache.org/jira/browse/MNG-5836
> Project: Maven
> Issue Type: Bug
> Reporter: Igor Fedorenko
>
> If one of the jars in $M2_HOME/lib/ext/*.jar happens to have simplelogger.properties, that configuration file masks logging configuration under $M2_HOME/conf/logging
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)