Skip to content
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

JSON logging using timbre? #70

Closed
tianjunyi opened this issue Jun 17, 2014 · 3 comments
Closed

JSON logging using timbre? #70

tianjunyi opened this issue Jun 17, 2014 · 3 comments

Comments

@tianjunyi
Copy link

No description provided.

@jeroenvandijk
Copy link

@tianjunyi Is this related to #71 ?

@ptaoussanis
Copy link
Member

Hi there,

There's no JSON appender included out-the-box with Timbre, but adding one would be quite easy. Please see the example-config docstring + code for an example of how to write an appender. You can then grab the :args key and print/store JSON from that using your preferred JSON lib.

Hope that helps, cheers! :-)

@yonatane
Copy link

yonatane commented Apr 1, 2018

For anyone interested, when you just want the stdout/err output to be in json format without changing the appender (e.g in Kubernetes using some log aggregator agent such as Datadog or Loggly), I've made available this output-fn which is similar to the default but formats the log data as json object:
yonatane/timbre-json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants