Closed greyblake closed 4 years ago
Hi, we're using logist, thanks for this library.
We'd like to be able to log hashes like this:
Rails.logger(foo: 'bar', xyz: 'abc')
Currently the resulted output is a nested JSON:
{"level": "INFO", "message": {"foo": "bar", "xyz":"abc" }}
What is reasonable.
However to be able parse and index the logs properly we need all this logged attributes to be on top level (not a nested JSON), like:
{"level": "INFO", "foo": "bar", "xyz":"abc" }
I'd like to open PR to add flat_json (boolean) configuration option for Logger and Formatter. Would you be possibly to accept and merge such PR?
flat_json (boolean)
Thanks in advance.
Hi, we're using logist, thanks for this library.
We'd like to be able to log hashes like this:
Currently the resulted output is a nested JSON:
What is reasonable.
However to be able parse and index the logs properly we need all this logged attributes to be on top level (not a nested JSON), like:
I'd like to open PR to add
flat_json (boolean)
configuration option for Logger and Formatter. Would you be possibly to accept and merge such PR?Thanks in advance.