Add support for custom MdcSerializer in EcsLayout #291
Labels
agent-java
community
Issues and PRs created by the community
triage
Issues and PRs that need to be triaged
Summary
EcsLayout
fromlog4j2-ecs-layout
currently uses a hardcoded implementation ofMdcSerializer
for MDC serialization. While this works well for most cases, it lacks flexibility for users with custom MDC serialization requirements.I propose adding support for configuring or overriding the
MdcSerializer
implementation to accommodate specific use cases, such as:Problem Statement
The current implementation of
MdcSerializer
is resolved dynamically usingMdcSerializer.Resolver
. However, it does not allow users to provide their ownMdcSerializer
implementation.Proposed Solution
Introduce a mechanism to customize the
MdcSerializer
, such as already implemented forObjectMessageJacksonSerializer
The text was updated successfully, but these errors were encountered: