[SOLVED] Logstash logging in JSON format

Currently, Logstash application logs are in Ruby debug format although I'd like to have them in JSON format instead. From what I can see, this isn't currently possible, although could this be added as potential feature?

Judging by the issue below it looks like it'll be available in Logstash 5.0.

HI,
currently It has been merged in the support to log in json format, see

From this PR:

This is made available by a --log-in-json flag. Default is false.
When false, the old behavior [1] is used.

When true, JSON logs are emitted.

[1] The old behavior is realy two things. First, using Object#inspect to
serialize. Second, to color the output if the IO is a tty.

According to https://github.com/elastic/logstash/blob/5.0/CHANGELOG.md this has been included in alpha-3 for the logstash 5.x series and into the 2.4 branch (https://github.com/elastic/logstash/commit/39e0ef5783c26d0da1175a036c74301fd70dfe7c) currently unreleased.

For sure the support to logging in json format might increase it's capabilities when log4j is in as @magnusbaeck pointed out.