-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[7.x] Add category field to deprecation logs #77550
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
[7.x] Add category field to deprecation logs #77550
Conversation
Deprecation logs in 7.x are using ESJsonLayout and it requires additional fields to be declared in a log4j config in order to emit values to logs. This commit adds category field to deprecation log pattern
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
ok to test |
|
@elasticmachine test this please |
|
@elasticmachine update branch |
|
merge conflict between base and head |
grcevski
left a comment
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.
LGTM! This looks good to me, I just had a question for my own better understanding, does the order of the fields declared in the .properties files matter? I can see that DeprecationIndexingComponent sets them in this order category,key,x-opaque-id, which is reversed from the properties files.
ChrisHegarty
left a comment
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.
LGTM.
@grcevski good catch! To be fair it would be better if we have them in the same order, but at the same time I don't think this would affect anyone - it is just the order of fields in indexed JSON vs order of fields in a log. |
Deprecation logs in 7.x are using ESJsonLayout and it requires
additional fields to be declared in a log4j config in order to emit
values to logs.
This commit adds category field to deprecation log pattern
context: in 8.0 we use ECSLayout which do not require to declare additional fields upfront. In 7.x we have to declare them in the logging config. The PR introducing categories in master #67443. A backport to 7.x which missed this field #68061