I've wondered this myself for a while as well. Hope you find an answer

-----Original Message-----
From: Sander Verhagen [mailto:[email protected]]
Sent: Thursday, April 16, 2015 02:20 AM
To: [email protected]
Subject: Logging for dependencies of Maven plugin

Hi group,


I already 
asked<http://stackoverflow.com/questions/29619125/logging-for-dependencies-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
[  [email protected]<mailto:[email protected]>  ]


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to