-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: enable auto-population of missing metadata in logs and printing structured logs to stdout #808
Merged
Conversation
This file contains 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
product-auto-label
bot
added
size: m
Pull request size is medium.
api: logging
Issues related to the googleapis/java-logging API.
labels
Dec 23, 2021
minherz
added
the
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
label
Dec 23, 2021
minherz
force-pushed
the
minherz/structured_logging
branch
from
December 30, 2021 09:15
754dd90
to
a40e509
Compare
product-auto-label
bot
added
size: l
Pull request size is large.
and removed
size: m
Pull request size is medium.
labels
Jan 1, 2022
minherz
changed the title
feat: enable auto-population of missing metadata in logs and structured logging
feat: enable auto-population of missing metadata in logs and printing structured logs to stdout
Jan 2, 2022
minherz
added
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
and removed
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
labels
Jan 3, 2022
minherz
force-pushed
the
minherz/structured_logging
branch
from
January 4, 2022 17:01
5f484a7
to
f9bda3d
Compare
minherz
removed
the
do not merge
Indicates a pull request not ready for merge, due to either quality or timing.
label
Jan 5, 2022
…e() (#798) Allows to opt-out auto populate log entry metadata on write in the write() API and Logging instance levels. Tests WriteOption to out-out auto populating metadata. Tests LoggingOption to out-out auto populating metadata. Tests default LoggingOption for auto populating metadata. Refactors LoggingOptions tests. Refactors LoggingOptions auto populate metadata getter method. Fixes cast compilation warning.
Populate empty metadata fields of each log entry on write().
Adds metadata auto-population flag to JUL handler. Adds metadata auto-population flag to logging config file. Forwards metadata auto-population flag via WriteOption to write() calls. Refactors JUL handler tests to remove duplication, unused calls and warnings
#812) Implements populateMetadata() API. Changes Logging.write() API to populate the provided list of log entries using the new API. Refactors SourceLocation.fromCurrentContext() to use a list of exclusion instead of the call stack depth level as parameter. Adds configuration `populateToStdout` to `LoggingConfig`. Use the new configuration within `LoggingHandler` to print to STDOUT instead of ingesting the log by calling Logging.write(). Refactor LoggingImpl, LoggingHandler and unit tests.
rename unit tests to reflect the right configuration name being tested. test log enhancers when redirecting to stdout.
minherz
force-pushed
the
minherz/structured_logging
branch
from
January 5, 2022 11:58
c8b0ee8
to
9e575b4
Compare
minherz
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 5, 2022
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 5, 2022
losalex
reviewed
Jan 5, 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.
It seems that you didnt merge latest changes which were discussed in previous iterations, can you please take a look and make sure all latest issues are addressed?
google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java
Outdated
Show resolved
Hide resolved
google-cloud-logging/src/main/java/com/google/cloud/logging/LogEntry.java
Outdated
Show resolved
Hide resolved
…ting JUL handler to STDOUT (#821) Add description about automatic metadata population and redirection of JUL logs to stdout to README. Reverse the use of 'appendComma' flag Rename populateMetadata? flags to make the logic clear
…eapis/java-logging into minherz/structured_logging
…eapis/java-logging into minherz/structured_logging
losalex
approved these changes
Jan 6, 2022
minherz
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 7, 2022
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
PR aggregates the following changes:
Fixes #689, closes #691, closes #799 and resolves #800