-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to correctly map the payload of a log.atInfo to a structured log #451
Comments
Thank you for reporting an issue. See the wiki for documentation and slack for questions. |
This might be helpful. https://www.baeldung.com/java-structured-logging |
I appreciate the article, still having the same issue however. I've already configured structured logging using the logstash-logback-encoder and have a encoder pattern that pulls out things like a correlationID from the MDC for example and this is functional. However the article suggests that any key value pair added will be automatically rendered as a structured log. Appreciate this may be a "my config" issue, but there's not a lot of clear guidance. My encoder looks like this:
I've tried both permutations of Am I missing something obvious? |
I don't think it's an issue related to kotlin-logging. You can try to debug it and see how it is decoded. |
Appreciate the feedback. I'm sure you're right. I'll mark this as resolved |
I'm using logback and I believe your library would allow me to map a logs payload to the output. I'm trying to use the payload part of the log to pass an event.
Something like
log.atInfo { message = "test" payload = buildMap(capacity = 1) { put(LogEvent.Event, LogEvent.Test_Event}}
Your wiki or docs don't really clearly tell me how I can access this payload value.
The text was updated successfully, but these errors were encountered: