Skip to content

feat: Allow customizing written log entries by exposing parameters via appender configuration #625

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

Merged
merged 40 commits into from
Jan 14, 2022

Conversation

losalex
Copy link
Contributor

@losalex losalex commented Jan 6, 2022

This feature enables customizing logs destination by setting project/folder/organization/billing destinations (see more details under logName field).

Fixes #551 ☕️

@losalex losalex requested a review from minherz January 6, 2022 00:47
@losalex losalex requested review from a team as code owners January 6, 2022 00:47
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: logging Issues related to the googleapis/java-logging-logback API. labels Jan 6, 2022
Copy link
Contributor

@minherz minherz left a comment

Choose a reason for hiding this comment

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

there is a couple of discrepancies that worth addressing before the merge.
between two options to configure project id: using LoggingOptions or providing the project id with WriteOption, please consider selecting one.

loggingOptions = LoggingOptions.getDefaultInstance();
} else {
LoggingOptions.Builder builder = LoggingOptions.newBuilder();
builder.setProjectId(projectId);
Copy link
Contributor

Choose a reason for hiding this comment

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

since the project id is already set via WriteOption there is no need to set it also using LoggingOptions.
I suggest to choice either method but not both.

Copy link
Contributor Author

@losalex losalex Jan 11, 2022

Choose a reason for hiding this comment

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

The projectId provided through setProjectId() overrides the one from credentials. If projectId was not set through setProjectId(), the one from credentials will be used

losalex and others added 17 commits January 12, 2022 00:10
Copy link
Contributor

@minherz minherz left a comment

Choose a reason for hiding this comment

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

lgtm.

Comment on lines +99 to +101
<!-- Optional: defaults to the project id obtained during authentication process. Project id is also used to construct resource name of the log entries -->
<logDestinationProjectId>String</logDestinationProjectId>

Copy link
Contributor

Choose a reason for hiding this comment

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

If this change is done by you, please undo it to avoid unnecessary PRs since the change to .readme-partials.yaml does the job.
If this change is submitted by Owlbot, please ignore this comment.

@losalex losalex merged commit 87d259f into main Jan 14, 2022
@losalex losalex deleted the losalex/fix-551 branch January 14, 2022 20:01
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: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customizing written log entries by exposing parameters via appender configuration
3 participants