https://kotlinlang.org logo
Title
d

DanielZ

06/09/2022, 7:40 AM
Hi, I need structured logging with a slightly different format 😕 It should look like:
{
   "@timestamp": "2022-06-02T12:00:00.0Z",
   "metadata": {...},
   "event": {...}
}
What would be the best approach? Basically copying whole
events.kt
file and adopt it with a customized
MetadataEvent
? Or is there a better option?
d

dave

06/09/2022, 8:10 AM
You could use a filter to wrap the metadata event at the end of the chain?
(and use a custom event which copies the data from it and has the 3 fields you need
d

DanielZ

06/09/2022, 8:13 AM
Cool, haven’t thought about that option. Thanks for this idea 🎉