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