[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.
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.
@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