-
Notifications
You must be signed in to change notification settings - Fork 31
feat: add support for metadata auto-population and redirection to STDOUT #649
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/test/java/com/google/cloud/logging/logback/LoggingAppenderTest.java
Outdated
Show resolved
Hide resolved
improve javadoc comments for methods. remove warnings. make methods with no modifier to be private.
add configuration to opt-out metadata auto-population. add configuration to redirect appender output to stdout. add relevant unit tests. refactor unit tests.
to test it as unit test the call LoggingOptions.getDefaultInstance() should be mocked.
losalex
approved these changes
Jan 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please just look if you can move resource handling into getMonitoredResource()?
src/main/java/com/google/cloud/logging/logback/LoggingAppender.java
Outdated
Show resolved
Hide resolved
minherz
added a commit
that referenced
this pull request
Jan 16, 2022
…OUT (#649) Add configuration to opt-out metadata auto-population. Add configuration to redirect appender output to stdout. Add relevant unit tests. Refactor unit tests. Improve javadoc comments for methods. Remove warnings. Make methods with no modifier to be private.
This was referenced Jan 16, 2022
feat: enable auto-population of missing metadata in logs and printing structured logs to stdout
#654
Merged
minherz
added a commit
that referenced
this pull request
Jan 18, 2022
… structured logs to stdout (#654) * feat: add support for metadata auto-population and redirection to STDOUT (#649) Add configuration to opt-out metadata auto-population. Add configuration to redirect appender output to stdout. Add relevant unit tests. Refactor unit tests. Improve javadoc comments for methods. Remove warnings. Make methods with no modifier to be private. * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
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-logback API.
size: m
Pull request size is medium.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade to use with the recent version (3.6.0) of the google-cloud-logging library which supports metadata auto-population and Json serialization of
LogEntry.Implement a configuration to auto-populate metadata into created log entries. Defaults to
true.Implement a configuration to redirect the appender's output to
stdout. Defaults tofalse.Add relevant unit tests.
Refactor existing unit tests to make best use of the EasyMock and remove redundant external classes.
Fixes #553, fixes #555.