I created a stdout output with no codec specified. When I input a line to stdin I get "2018-02-13T22:44:04.309Z t %{message}". That seems wrong.
Which version of Logstash? Could you give a complete recipe for reproducing the problem? Because it works fine for me with an old version.
$ echo foo | /opt/logstash/bin/logstash -e 'input { stdin {} } output { stdout {} }'
Settings: Default pipeline workers: 8
Pipeline main started
2018-02-14T07:24:16.597Z lnxolofon foo
Pipeline main has been shutdown
stopping pipeline {:id=>"main"}
@magnusbaeck I get it with
echo '{ "foo" : 1}' | /usr/share/logstash/bin/logstash -e 'input { stdin { codec => "json_lines" } } output { stdout { } }'
This is in logstash 6.2.0. It does not happen if no codec is specified for stdin. With a rubydebug codec I do not see a message field in the output, just foo, so I guess that explains why it is not substituted. Similarly for a json input codec, there is no message field in the event.
Yes, this is expected.