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

feat: enable auto-population of missing metadata in logs and printing structured logs to stdout #808

Merged
merged 13 commits into from Jan 7, 2022

Conversation

@product-auto-label 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 minherz added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 23, 2021
@product-auto-label 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 minherz marked this pull request as ready for review January 1, 2022 17:30
@minherz minherz requested review from a team as code owners January 1, 2022 17:30
@minherz 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 minherz assigned minherz and unassigned simonz130 Jan 2, 2022
@minherz 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 minherz removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 5, 2022
minherz and others added 6 commits January 5, 2022 11:58
…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 minherz added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 5, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 5, 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.

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?

@minherz minherz added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 7, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 7, 2022
@minherz minherz merged commit bb25d5d into main Jan 7, 2022
@minherz minherz deleted the minherz/structured_logging branch January 7, 2022 14:48
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: l Pull request size is large.
Projects
None yet
4 participants