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

Support logging via JUL #1211

Merged
merged 11 commits into from
Jan 29, 2021
Merged

Support logging via JUL #1211

merged 11 commits into from
Jan 29, 2021

Conversation

maciejwalkowiak
Copy link
Contributor

📜 Description

Support logging via JUL + sample project.

💡 Motivation and Context

Fixes #1037

💚 How did you test it?

Unit & Integration tests.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • No breaking changes

🔮 Next steps

Create a PR in Quarkus or let know Quarkus team about JUL logger in Sentry SDK, so that they do not need to maintain their custom one.

@maciejwalkowiak
Copy link
Contributor Author

Afterthought - for the backward compatibility we should also support MDC tags, which means we need a dependency for SLF4J, which means that JUL appender would have to go to separate module.

@codecov-io
Copy link

codecov-io commented Jan 27, 2021

Codecov Report

Merging #1211 (3390bd2) into main (d58b440) will decrease coverage by 0.05%.
The diff coverage is 71.90%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1211      +/-   ##
============================================
- Coverage     74.62%   74.57%   -0.06%     
- Complexity     1682     1713      +31     
============================================
  Files           176      177       +1     
  Lines          5908     6029     +121     
  Branches        578      600      +22     
============================================
+ Hits           4409     4496      +87     
- Misses         1234     1256      +22     
- Partials        265      277      +12     
Impacted Files Coverage Δ Complexity Δ
...jul/src/main/java/io/sentry/jul/SentryHandler.java 71.90% <71.90%> (ø) 31.00 <31.00> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d58b440...3390bd2. Read the comment docs.

@bruno-garcia
Copy link
Member

Afterthought - for the backward compatibility we should also support MDC tags, which means we need a dependency for SLF4J, which means that JUL appender would have to go to separate module.

Sorry but I don't follow. before it wasnt' a separate package, so why does it need to be now for backwards compat?

@marandaneto
Copy link
Contributor

Afterthought - for the backward compatibility we should also support MDC tags, which means we need a dependency for SLF4J, which means that JUL appender would have to go to separate module.

Sorry but I don't follow. before it wasnt' a separate package, so why does it need to be now for backwards compat?

adding a dependency of SLF4J I believe.

@maciejwalkowiak
Copy link
Contributor Author

As @marandaneto said, since 3.x we do not have slf4j dependency in the SDK core. I am not really sure how people use slf4j AND jul at the same time, but since it was in 1.x and it's also in handler added to Quarkus, I think we should follow the same path.

@bruno-garcia
Copy link
Member

makes sense

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few comments but looks good and ready to go.
LGTM
The next step would be to create docs too, probably linking to the migration page.

@marandaneto
Copy link
Contributor

@maciejwalkowiak CI is not happy

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.

Support for java.util.logging (jul)
4 participants