Formatting logs: logstash w/ log4js

Does anybody here have experience using logstash w/ log4js? We’re moving to our ELK stack from papertrail and our logs look super gross since they have shell color escape sequences in them which Kibana doesn’t know what to do with e.g.

[32m[2016-01-29 20:55:09.389])

What does your log4js configuration look like?

It’s vanilla / out of the box; I’d love to keep the colors and have kibana color things — but if needed i’d give up and switch to basicLayout

If you have a suggestion on a better config for logstash, i’m all ears @Philonous

I’d suggest using a basic layout in log4js so that the data is properly formed, and then breaking it down into structured data in logstash.

Once you have the structured data into ES (from Logstash), Kibana should be able to do some custom rendering which may include coloring.