Skip to content

SnatypeClient logs not forwarded to sbt client #376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adpi2 opened this issue Mar 6, 2023 · 6 comments · Fixed by #377
Closed

SnatypeClient logs not forwarded to sbt client #376

adpi2 opened this issue Mar 6, 2023 · 6 comments · Fixed by #377

Comments

@adpi2
Copy link

adpi2 commented Mar 6, 2023

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?

@xerial
Copy link
Owner

xerial commented Mar 8, 2023

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?

@xerial
Copy link
Owner

xerial commented Mar 8, 2023

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

@xerial
Copy link
Owner

xerial commented Mar 8, 2023

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

@xerial
Copy link
Owner

xerial commented Mar 9, 2023

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

@xerial xerial closed this as completed Mar 9, 2023
@xerial
Copy link
Owner

xerial commented Mar 9, 2023

Confirmed the fix is working well with sbtn
image

@adpi2
Copy link
Author

adpi2 commented Mar 10, 2023

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants