tinylog-org / tinylog

tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android
https://tinylog.org
Apache License 2.0
699 stars 82 forks source link

Structured logging #369

Closed getkey closed 1 year ago

getkey commented 1 year ago

In #209, @dbacinski wrote a writer that emits JSON logs. As modern backends are gravitating towards this format, it would be great if it was available in tinylog natively. Could @dbacinski's code be considered for inclusion in the library?

pmwmedia commented 1 year ago

It is already available natively in tinylog.

tinylog 2 has a JSON writer for outputting JSON or LDJSON to log files: https://tinylog.org/v2/configuration/#json-writer

In the coming version 3, the file and console writer can output NDJSON directly: https://github.com/tinylog-org/website/blob/v3/content/documentation/configuration.md#json

getkey commented 1 year ago

Wonderful! Looking forward to v3 :smile: