rocketraman commented on PR #2419: URL: https://github.com/apache/logging-log4j2/pull/2419#issuecomment-2024335371
> All events in a ResourceLogger use ParameterizedMapMessage. When logging it behaves like a ParameterizedMessage in that formatMessage only returns the message directly being logged. However, it is a MapMessage so all the attributes can be accessed via the normal Layout, Lookup, and Filter capabilities we have added. In structured logging use cases (e.g. to Google Cloud Logging), the resource attributes should go to the "context" field. With this approach, the attributes will go to the "message" field. It won't be possible to easily find all the log messages when the same attributes are used with `ScopedContext` in some places (because the resource is relevant to a Thread) and with `ResourceLogger` in others (because the resource logs internally). I think we need an approach that will allow sending resource attributes to "context" so the two approaches are consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
