We use coursier in a build pipeline where artifacts are build from scratch. It would be awesome to be able to turn of logging of download processes for artifacts by providing either a silent Logger trait or by being able to configure the logger.
From the CLI tools, the --quiet or -q option should silent most logs.
From the plugin, the coursierVerbosity key is supposed to silence the same logs. It defaults to 1. The default value can also be tweaked via the environment (COURSIER_VERBOSITY) or Java properties (coursier.verbosity). Or you can try setting the coursierVerbosity key itself.
I am not sure if I understand the answer - I tried to add coursierVerbosity := 0 in my build.sbt file but I still get tousands of downloading artifcat messages. Is this functionality only implemented in 1.0.0? I am using 1.0.0-M14 (sbt plugin, by the way)
It would be good to explain in the README what the verbosity level does.
For example, on travis, I'd like to turn off the following messages:
Downloaded https://repo1.maven.org/maven2/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar
Downloading https://repo1.maven.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar
Downloaded https://dl.bintray.com/tiwg/org.omg.tiwg/org/omg/tiwg/org.omg.oti.uml.core_2.11/3.4.2/org.omg.oti.uml.core_2.11-3.4.2-resource.zip
Downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.11/0.8.0-RC8/scala-java8-compat_2.11-0.8.0-RC8.jar
Downloaded https://repo1.maven.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar
Downloaded https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.4/httpcore-osgi-4.4.4.jar
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (85.17 %, 64959…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (4.67 %, 765853…
Downloaded https://repo1.maven.org/maven2/org/scala-lang/modules/scala-java8-compat_2.11/0.8.0-RC8/scala-java8-compat_2.11-0.8.0-RC8.jar
Downloaded https://repo1.maven.org/maven2/com/chuusai/shapeless_2.11/2.3.0/shapeless_2.11-2.3.0.jar
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (89.81 %, 68493…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (6.88 %, 112706…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (94.40 %, 71999…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (9.04 %, 148214…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (98.92 %, 75448…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (11.26 %, 18457…
Downloaded https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl/imce/imce.third_party.scala_libraries_2.11/3.0.4/imce.third_party.scala_libraries_2.11-3.0.4-resource.zip
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (13.49 %, 22110…
https://dl.bintray.com/jpl-imce/gov.nasa.jpl.imce/gov/nasa/jpl… (15.71 %, 25751…
From the logic of the code, I hope that coursierVerbosity := -1 will do the trick;
however, it is unclear whether all the above messages are controlled by the coursierVerbosity level.
Darn, that's not enough; I tried everything that can be tweaked to affect the output.
/bin/rm -rf ~/.coursier/; sbt -batch -Dcoursier.verbosity=<value> update
I don't see much difference regardless of whether
Am I missing something?
Hello,
Using export COURSIER_VERBOSITY=0 with csbt I still get all the logs.
Still not resolved in coursier 1.0.0. I tried export COURSIER_VERBOSITY=0, sbt -Dcoursier.verbosity=0 and coursierVerbosity := 0 in build.sbt
Any progress? This has been opened since 2016 and developers have been commenting that the options the plugin provides are not working. Is it a bug? How can we stop these info messages that only hide potential real issues with the builds?
Confirm that it still happening as on 1.0.4.
And COURSIER_VERBOSITY, -Dcoursier.verbosity=0 and coursier.Keys.coursierVerbosity := 0 doesn't help it. So is -1.
I still have roughly 5000 lines of Downloading/Downloaded.
Most helpful comment
Darn, that's not enough; I tried everything that can be tweaked to affect the output.
I don't see much difference regardless of whether is -1, 0, 1, 2.
Am I missing something?