Log4j2-ecs-layout serialize MDC

Is there any option not to serialize MDC fields by default ?
I am using additional fields to serialize under different name like <KeyValuePair name="labels.X" value="%X(Y)" and as result I get two fields labels.X=value and Y=value.
I would like not to generate Y=value.
I would like also an option not to generate output for fields with null value.

Hi there @tbglazer !

I'm not too familiar with this library, but if you have a full example it might be worth posting as an issue on Issues · elastic/ecs-logging-java · GitHub

The %X(Y) seems like it should be %X{Y} to me, but I could be misreading Log4j – Log4j 2 Layouts for that.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.