arktekk / sbt-aether-deploy

Deploy SBT artifacts using Maven Artifact Resolver (formerly Eclipse Aether)
Other
84 stars 31 forks source link

How to turn off uploading progress logging? #37

Closed nartamonov closed 7 years ago

nartamonov commented 8 years ago

Hi!

Is it possible to turn off very verbose logging of artifacts uploading progress?

> sbt publish
...
[info] Deploying udss.archive:stat-counter_2.11:jar:assembly:vTESTCI-1 to maven-releases 
[info] 32/21691 KB   

[info] 64/21691 KB   

[info] 96/21691 KB   

[info] 128/21691 KB   

[info] 160/21691 KB   

[info] 192/21691 KB   

[info] 224/21691 KB   

[info] 256/21691 KB   

[info] 288/21691 KB   

[info] 320/21691 KB   

[info] 352/21691 KB

...
hamnis commented 8 years ago

Currently that is not possible.

NicolasRouquette commented 7 years ago

Since aetherDeploy is a task, it should be possible to configure task-specific logging:

set logLevel in aetherDeploy := Level.Warn

This didn't work for me (with sbt 0.13.13 & aetherDeploy 0.17):

<set>:1: error: not found: value aetherDeploy
logLevel in aetherDeploy := Level.Warn
                   ^

Currently, the only solution I know of is to do it globally and then restore task-specific logging for other configurable tasks:

set logLevel := Level.Warn
set logLevel in compile := Level.Info

Then, aetherDeploy is quiet; however, it is too quiet because upload progress & the artifact uploaded are logged at the same level - i.e. Level.Info.

It would be better if the progress were logged at Level.Debug & artifacts at Level.Info.

I think that's possible; it could be simply a matter of changing the log level here:

https://github.com/arktekk/sbt-aether-deploy/blob/master/src/main/scala/aether/internal/ConsoleTransferListener.scala#L44