xerial / sbt-sonatype

A sbt plugin for publishing Scala/Java projects to the Maven central.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SnatypeClient logs not forwarded to sbt client

adpi2 opened this issue · comments

commented

Describe the bug
When I trigger sonatypeBundleRelease from an sbt client shell (using sbtn) I cannot see the logs from SonatypeClient. All I see is:

sbt:root> sonatypeBundleRelease
[info] Preparing a new staging repository for [sbt-sonatype] root 3.0.4
[info] Updating sonatypePublishTo settings...
[info] Welcome to scala-debug-adapter 3.0.4
sbt:root>

How to reproduce the issue
Describe how to reproduce the issue and show the current configurations.

  • sbt version: 1.8.0
  • sbt-sonatype version: 3.9.13
$ sbtn
> sonatypeBundleRelease
...

Additional context
I see that you use wvlet.log here and that's probably why the logs are not forwarded to sbt clients. Is it possible to configure wvlet.log to forward the logs to the sbt logger in state.streams.log?

Thanks. I also noticed this issue. airframe-log sends log messages to the standard java.util.logging and stderr, but some sbt-plugins (e.g., sbt-release is one of the examples) may set an unexpected log output target.

It would be possible to add a log handler to redirect the default logger output to state.streams.log, but as long as there are other plugins that configure java.util.logging, the same problem can still happen.

Adding a log handler between the root logger and org.xerial.sbt.sonatype package specific log handler might mitigate the issue.

Just in case, could you try using the latest sbt-sonatype 3.9.17?

btw, I think it's sbtn specific issue. It doesn't show any messages from java.util.logging.

Confirmed the reproduction. Let me handle this issue in airframe-log wvlet/airframe#2777

sbt-sonatype 3.9.18 has been released. This will fix the issue

Confirmed the fix is working well with sbtn
image

commented

Thanks a lot!