Skip to content

Conversation

@minherz
Copy link
Contributor

@minherz minherz commented Jan 12, 2022

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 to false.
Add relevant unit tests.
Refactor existing unit tests to make best use of the EasyMock and remove redundant external classes.

Fixes #553, fixes #555.

@minherz minherz requested a review from a team as a code owner January 12, 2022 09:40
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: logging Issues related to the googleapis/java-logging-logback API. labels Jan 12, 2022
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.
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.

can you please just look if you can move resource handling into getMonitoredResource()?

@minherz minherz merged commit f1f8d85 into structured_logging Jan 16, 2022
@minherz minherz deleted the minherz/555 branch January 16, 2022 12:57
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.
@minherz minherz restored the minherz/555 branch January 16, 2022 15:17
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants