mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- add default stdin/stdout when necessary if the -e flag is used.
This commit is contained in:
parent
b083c5dc72
commit
ffcd656498
1 changed files with 9 additions and 0 deletions
|
@ -73,6 +73,15 @@ class LogStash::Agent < Clamp::Command
|
||||||
|
|
||||||
if @config_path
|
if @config_path
|
||||||
@config_string = load_config(@config_path)
|
@config_string = load_config(@config_path)
|
||||||
|
else
|
||||||
|
# include a default stdin input if no inputs given
|
||||||
|
if @config_string !~ /input *{/
|
||||||
|
@config_string += "input { stdin { } }"
|
||||||
|
end
|
||||||
|
# include a default stdout output if no outputs given
|
||||||
|
if @config_string !~ /output *{/
|
||||||
|
@config_string += "output { stdout { codec => rubydebug } }"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue