-
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: configure opt-out metada auto-population for JUL handler #807
Conversation
@@ -417,4 +456,8 @@ private Logging getLogging() { | |||
} | |||
return logging; | |||
} | |||
|
|||
private static boolean isTrueOrNull(Boolean b) { |
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.
nit: Such methods ideally should accept additional variable with default value to be returned in case if checked parameter is null.
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 is not "getter". This method is used to answer the question whether the parameter is null
or Boolean.TRUE
.
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.
nit: I was kinda suggesting to make it "getter", so it can be reused later if needed
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.
There is "getter":
java-logging/google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
Lines 401 to 403 in 6bc345c
public Boolean getAutoPopulateMetadata() { | |
return this.autoPopulateMetadata; | |
} |
The above is a service method used at initialization only to enforce opt-out if one of the original sources of the configuration: LoggingOptions or config file has it set to FALSE. However, if the configuration is omitted then it should be interpreted as "allowed" according to the design requirement: to allow by default.
google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
Outdated
Show resolved
Hide resolved
google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingHandler.java
Show resolved
Hide resolved
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
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
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
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
…ogs redirection to stdout in JUL handler (#808) Aggregates the following work: - #821 - #812 - #807 - #803 - #798 Fixes #689, #691, #799 and #800 * 🦉 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>
Allow to opt-out auto-population of the log entries with additional metadata in JUL handler using the flag in
LoggingOptions
andLoggingConfig
configuration.Opt-out is set if at least one of the above will be set to
false
. Absence of the configuration is interpreted same as setting the configuration totrue
.