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

fix: Make LoggingHandler.logEntryFor extensible #1021

Merged
merged 2 commits into from
Aug 19, 2022

Conversation

bpcreech
Copy link
Contributor

@bpcreech bpcreech commented Jul 30, 2022

This is a stopgap solution suggested by minherz@ in #747. The long-term fix is #32 but that seems like it could take some time (it's been open 3 years and is pending a major version bump).

This enables us to enhance the c.g.cloud.logging.LogEntry in ways that require access to the original java.util.logging.LogRecord, e.g.:

  • Setting SourceLocation using extra, more accurate context the Google Flogger library captures (on a subclass of the JUL LogRecord),
  • Recording logRecord.getThreadID,
  • Recording exception name explicitly from record.getThrown(),
  • etc

@bpcreech bpcreech requested review from a team as code owners July 30, 2022 22:56
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: logging Issues related to the googleapis/java-logging API. labels Jul 30, 2022
@losalex losalex self-assigned this Jul 31, 2022
Copy link
Contributor

@losalex losalex left a comment

Choose a reason for hiding this comment

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

LGTM

@losalex losalex added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 19, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 19, 2022
@losalex losalex changed the title Make LoggingHandler.logEntryFor extensible fix: Make LoggingHandler.logEntryFor extensible Aug 19, 2022
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Aug 19, 2022
@losalex losalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 19, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 19, 2022
@losalex losalex merged commit 79baac6 into googleapis:main Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants