Skip to content
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

Readding slf4j-bridge #415

Merged
merged 11 commits into from May 21, 2022
Merged

Readding slf4j-bridge #415

merged 11 commits into from May 21, 2022

Conversation

vigoo
Copy link
Contributor

@vigoo vigoo commented Feb 10, 2022

This PR readds the slf4j-bridge subproject, which enables users to use a lightweight, ZIO based logger (such as the console logger) without including any Java logging frameworks, but still capture the 3rd party library logs via SLF4j.

@jdegoes
Copy link
Member

jdegoes commented Feb 10, 2022

Can you run Scalafix and Scalafmt?

@jdegoes
Copy link
Member

jdegoes commented Feb 10, 2022

We should have an official test logger backend that captures the log entries

👍 Yes. Possibly this should be bundled into ZIO Test so you can automatically access logs from your tests.

It feels a bit unusual to not be able to log a message together with a throwable, although I worked around that by wrapping the failure in one more exception that encapsulates the custom message

See discussion on Slack.

I'm not sure how setting up the whole thing will look like in the real world, so maybe having the bridge initialization as a ZIOApp is not a good idea.

I think it should be a RuntimeConfigAspect, instead. What do you think about that?

@jdegoes jdegoes merged commit 2e61276 into zio:master May 21, 2022
@vigoo vigoo deleted the readd-bridge branch May 22, 2022 08:03
jdegoes added a commit that referenced this pull request May 23, 2022
* fixes trace level logging

* Readding slf4j-bridge (#415)

* Readding slf4j-bridge

* Add subproject

* Format

* Add to testJVM

* Make it work with latest ZIO

* Fix warnings

* Format

* Fix other Scala versions

* Fix warning

Co-authored-by: John A. De Goes <john@degoes.net>

Co-authored-by: Daniel Vigovszky <daniel.vigovszky@gmail.com>
Co-authored-by: John A. De Goes <john@degoes.net>
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 this pull request may close these issues.

None yet

2 participants