Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Added Marker to JSON layout. #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

seb-droig
Copy link

I've been scouring the Internet for clues on how to do it with Logback, but ultimately decided to fix this at the source.

I've tried solving my problem by implementing a class that inherits from ch.qos.logback.contrib.json.classic.JsonLayout, but I lost control on where to put the Marker field since it internally uses a LinkedHashMap so it wound up at the end, which looks a bit weird. My implementation worked, but I figured others might benefit from this functionality, so that's why I created this PR. I've tried to put the Marker field where I thought it made sense (after the log level), but you can obviously change this at your discretion.

Hopefully, you'll find it worthwhile to create a new release with this.

Thanks for maintaining Logback, it's usually my go-to logging implementation.

Signed-off-by: Daniel Roig <daniel.roig@seb.se>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant