logstash-plugins / logstash-input-stdin

Apache License 2.0
6 stars 16 forks source link

inform user that stdin is ready to receive input if on tty #12

Closed jsvd closed 8 years ago

jsvd commented 8 years ago

this is what this looks like when running logstash on the terminal:

% bin/logstash -e ""
The stdin plugin is now waiting for input:
helllo
{
    "@timestamp" => 2016-09-13T17:29:09.479Z,
      "@version" => "1",
          "host" => "Joaos-MBP.lan",
       "message" => "helllo",
          "type" => "stdin"
}

However, if standard input is not on a tty (either because logstash is running on the background or something is piping to it) then it doesn't show the message:

% echo "hi" | bin/logstash -e ""
{
    "@timestamp" => 2016-09-13T17:28:40.551Z,
      "@version" => "1",
          "host" => "Joaos-MBP.lan",
       "message" => "hi",
          "type" => "stdin"
}
%
suyograo commented 8 years ago

LGTM