Nebo15 / logger_json

JSON logger formatter with support for Google Cloud, DataDog and other for Elixir.
https://nebo15.github.io/logger_json/
MIT License
242 stars 94 forks source link

Datadog formatter: Adding the log level to the root of the logged object #140

Open Miradorn opened 1 week ago

Miradorn commented 1 week ago

Hey there!

I'm trying to migrate our codebase from an old formatter to LoggerJson, using Datadog format since we're using Datadog for tracing and metrics. Unfortunately at this point we're not using datadog for log management but another solution. This other solution doesn't extract log levels from the syslog field but expect a top-level level field.

Would it be possible to add the level to the top level? I can't seem to see a way how it could be done currently, so I think my question is, would a MR be accepted that adds that field for the datadog formatter?

Thanks!