Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

configure logging to use JSON by default so its easier to work with logstash? #99

Open
jstrachan opened this issue Nov 9, 2014 · 2 comments

Comments

@jstrachan
Copy link
Contributor

for java/karaf/tomcat/wildfly images we should default to use JSON logging so that things just work nicely with logstash and elasticsearch?

@davsclaus
Copy link
Member

Whoa you mean their container logging should be in some kind of json format. How would you do that?

@jstrachan
Copy link
Contributor Author

yeah - using a logging pattern to output lines of text in json format.

We've 3 choices

  • treat all logs as a single line of text (so no category / time / thread / breadcrumb)
  • we log random output using arbitrary formats (whatever log4j.properties wins) then folks manually try figure out the regex expressions to then be able to parse into fields for dumping into Elasticsearch
  • we log as json so that automatically all logs go nicely into Elasticsearch with no dodgy regex to maintain; and all the values such as breadcrumbs/threads/categories/levels are all nicely searchable

If we had a nice json log viewer, we could then do a nice coloured tail program so folks get nicer text output on their shells (properly colouring info/err/warning lines etc)?

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

No branches or pull requests

2 participants