Hi all,
Thank you, Robert. I understand that you suggest changing a configuration file that is part of the local Maven installation. While that strategy would (possibly) suffice for myself, when debugging this plugin, I would appreciate contributing back a solution for all users of this plugin that worked without changing their local Maven installation. Are there any expectations with the current implementation of Maven, that plugins would be able to extend/override the definitions of $MAVEN_HOME/conf/logging/simplelogger.properties? I had seen your link [1] before and it mentions "a class loader resource named "simplelogger.properties"", but I'm unfamiliar in how that translates to class loading scopes of plugins (although I'd suspect that it would override the entire simplelogger.properties at best, if that already, which would not be extremely helpful). I'd say that HttpClient is using commons-logging. Sander. Sander Verhagen [ san...@sanderverhagen.net ] NOTICE: my e-mail address has changed. You may still e-mail me at verha...@sander.com but you will see me using san...@sanderverhagen.net from now on. Feel free to update your address book. > -----Original Message----- > From: Robert Scholte [mailto:rfscho...@apache.org] > Sent: Thursday, April 16, 2015 10:08 > To: Maven Users List > Subject: Re: Logging for dependencies of Maven plugin > > Hi, > > This might be possible with Maven-3.1.1+ by changing the apache-maven- > 3.x/conf/logging/simplelogger.properties > See SimpleLogger[1] for the configuration options. > You need to specify a specific logLevel for these packages > (org.slf4j.simpleLogger.log.a.b.c) , so it doesn't pick up the > defaultLogLevel ( > as passed by Maven, e.g. -X will set defaultLogLevel to > debug) > However, I don't know which logging framework is used by HttpClient. You > might need to add a specific SLF4J adapter to the apache-maven-3.x/lib/ext > for that. > This is how it should work, but I haven't tried it yet. > > thanks, > Robert > > [1] http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html > > > Op Thu, 16 Apr 2015 16:54:24 +0200 schreef Endo Alejandro > <alejandro.e...@grassvalley.com>: > > > I've wondered this myself for a while as well. Hope you find an answer > > > > -----Original Message----- > > From: Sander Verhagen [mailto:san...@sanderverhagen.net] > > Sent: Thursday, April 16, 2015 02:20 AM > > To: users@maven.apache.org > > Subject: Logging for dependencies of Maven plugin > > > > Hi group, > > > > > > I already > > asked<http://stackoverflow.com/questions/29619125/logging-for- > dependen > > cies-of-maven-plugin> this on Stack Overflow, but I think it's a > > somewhat specialized question, so I wanted to ask here as well. I > > would like to influence logging of dependencies of a plugin that I'm > > contributing to, so that when Maven is ran in debug (-X, --debug) I > > can log some sensible debug information in the context of my plugin, > > without being flooded with debug logging from my plugin's > > dependencies. > > > > This is the situation: > > > > * Building a plugin > > > > * The plugin depends on > > org.apache.httpcomponents:httpclient:4.3.6 and uses HttpClientBuilder > > to build a CloseableHttpClient > > > > * When Maven runs in debug (-X, --debug) also HttpClient kicks > > into debug mode > > > > * While in debug mode, HttpClient logs way, way more than I want > > > > How can I configure my plugin so that a certain logger is not set to > > DEBUG, even though Maven is in debug (-X, --debug)? > > > > I have tried various strategies of doing this programmatically, or > > providing the logging configurations for a few of the common > > frameworks that I suspect are on my classpath (SLF4J, Commons Logging, > > Log4j), but all to no avail. > > > > Your help much appreciated. > > > > > > Sander Verhagen > > [ san...@sanderverhagen.net<mailto:san...@sanderverhagen.net> ] > > > > > > DISCLAIMER: > > Privileged and/or Confidential information may be contained in this > > message. If you are not the addressee of this message, you may not > > copy, use or deliver this message to anyone. In such event, you should > > destroy the message and kindly notify the sender by reply e-mail. It > > is understood that opinions or conclusions that do not relate to the > > official business of the company are neither given nor endorsed by the > > company. > > Thank You. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org