Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[core.logging] Add RewriteAppender for filtering LogMeta. #91492
[core.logging] Add RewriteAppender for filtering LogMeta. #91492
Changes from 4 commits
752bdf1
71e46ce
e1c6402
ae5facc
03a0397
61d4450
0dc0afc
44d1440
524cc31
c72c75b
7cbe347
e9b9bcc
8fb040e
88397a5
a6632ee
eabb888
0516db3
c777305
e0f4c58
11b5512
b46e404
f6ae2ea
353d8e5
dcee4b9
f9f28dd
3d2a945
102d490
aa5d21e
fb23cb1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I can't find
MetaRewritePolicy
in log4j http://logging.apache.org/log4j/2.x/manual/appenders.html#RewritePolicyDo we call so because we apply a policy to
Meta
object only?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.
I think
MetaRewritePolicy
is a combined modification of log4j'sMapRewritePolicy
andPropertiesRewritePolicy
where we're using thetype
field and theproperties
field rather than thekeyValuePair
inMetaRewritePolicy
and we're allowing fields to be added too ( whatPropertiesRewritePolicy
does). And, yes, the policy is applied to themeta
property. It's hard to tell though because our implementation isn't a 1-to-1 with log4j.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.
Yeah exactly, they have a
map
andproperties
rewrite policy, so I called thismeta
as it is only scoped to theLogMeta
. With this pattern, in the future we could have something like amessage
orlevel
policy that will rewrite those items specifically.