elastic / elastic/ecs-logging-java

Output message as json

Open
#244 1 comment 0 reactions 0 assignees View on GitHub
agent-java community triage
Dominant language
Java
Stars
148
Forks
82
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Hi, I started to use this package in conjuction with `logback-logstash-encoder` for message layout.
Then I noticed that message is output being quoted as string even if it is actually json.

I suppose this is because `EcsJsonSerializer.serializeFormattedMessage` is always used for any message layout in `EcsEncorder`.
https://github.com/elastic/ecs-logging-java/blob/main/logback-ecs-encoder/src/main/java/co/elastic/logging/logback/EcsEncoder.java#L149

Currently is there any way to output message in json or do you have any plan to support such feature?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.