FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: configure opt-out metada auto-population for JUL handler by minherz · Pull Request #807 · googleapis/java-logging · GitHub

This repository was archived by the owner on Feb 6, 2026. It is now read-only.
/ java-logging Public archive

feat: configure opt-out metada auto-population for JUL handler - #807

Merged
minherz merged 3 commits into
minherz/structured_loggingfrom
minherz/799
Dec 23, 2021
Merged

feat: configure opt-out metada auto-population for JUL handler#807
minherz merged 3 commits into
minherz/structured_loggingfrom
minherz/799

Conversation

minherz commented Dec 23, 2021

Copy link
Copy Markdown
Contributor

Allow to opt-out auto-population of the log entries with additional metadata in JUL handler using the flag in LoggingOptions and LoggingConfig 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 to true.

minherz self-assigned this Dec 23, 2021
minherz requested review from a team December 23, 2021 11:39
product-auto-label Bot added size: s Pull request size is small. api: logging Issues related to the googleapis/java-logging API. labels Dec 23, 2021
return logging;
}

private static boolean isTrueOrNull(Boolean b) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: Such methods ideally should accept additional variable with default value to be returned in case if checked parameter is null.

minherz Dec 23, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It is not "getter". This method is used to answer the question whether the parameter is null or Boolean.TRUE.

losalex Dec 23, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: I was kinda suggesting to make it "getter", so it can be reused later if needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There is "getter":

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.

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
minherz merged commit a9db521 into minherz/structured_logging Dec 23, 2021
minherz deleted the minherz/799 branch December 23, 2021 19:18
minherz added a commit that referenced this pull request Dec 30, 2021
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
minherz added a commit that referenced this pull request Jan 4, 2022
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
minherz added a commit that referenced this pull request Jan 5, 2022
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
minherz added a commit that referenced this pull request Jan 7, 2022
…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>
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: logging Issues related to the googleapis/java-logging API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL