mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Merge pull request #1179 from jordansissel/improve-e-flag
Allow -f and -e flags together.
This commit is contained in:
commit
ac0ed3540f
1 changed files with 5 additions and 2 deletions
|
@ -10,7 +10,7 @@ class LogStash::Agent < Clamp::Command
|
|||
|
||||
option "-e", "CONFIG_STRING",
|
||||
I18n.t("logstash.agent.flag.config-string"),
|
||||
:attribute_name => :config_string
|
||||
:default => "", :attribute_name => :config_string
|
||||
|
||||
option ["-w", "--filterworkers"], "COUNT",
|
||||
I18n.t("logstash.agent.flag.filterworkers"),
|
||||
|
@ -90,7 +90,10 @@ class LogStash::Agent < Clamp::Command
|
|||
end
|
||||
|
||||
if @config_path
|
||||
@config_string = load_config(@config_path)
|
||||
# Append the config string.
|
||||
# This allows users to provide both -f and -e flags. The combination
|
||||
# is rare, but useful for debugging.
|
||||
@config_string += load_config(@config_path)
|
||||
else
|
||||
# include a default stdin input if no inputs given
|
||||
if @config_string !~ /input *{/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue