Add basic config validation

This commit is contained in:
Jordan Sissel 2010-11-17 23:46:14 -08:00
parent 8d98999139
commit 6ebe1e4f0e

View file

@ -30,6 +30,10 @@ class LogStash::Agent
def register
# TODO(sissel): warn when no inputs and no outputs are defined.
# TODO(sissel): Refactor this madness into a config lib
if (["inputs", "outputs"] & @config.keys).length == 0
$stderr.puts "No inputs or no outputs configured. This probably isn't what you want."
end
# Register input and output stuff
if @config.include?("inputs")