Skip to content

Commit 1a13421

Browse files
committed
- finish up the agent2 conversion
1 parent 9542246 commit 1a13421

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

lib/logstash/agent.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "clamp" # gem 'clamp'
22
require "logstash/errors"
33

4-
class LogStash::Agent2 < Clamp::Command
4+
class LogStash::Agent < Clamp::Command
55
option ["-f", "--config"], "CONFIG_PATH",
66
I18n.t("logstash.agent.flag.config"),
77
:attribute_name => :config_path
@@ -241,4 +241,4 @@ def load_config(path)
241241
end
242242
return config
243243
end # def load_config
244-
end # class LogStash::Agent2
244+
end # class LogStash::Agent

lib/logstash/runner.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ def run(args)
9191
command = args.shift
9292
commands = {
9393
"version" => lambda { emit_version(args) },
94-
"agent" => lambda do
95-
require "logstash/agent"
96-
agent = LogStash::Agent.new
97-
@runners << agent
98-
return agent.run(args)
99-
end,
10094
"web" => lambda do
10195
require "logstash/web/runner"
10296
web = LogStash::Web::Runner.new
@@ -173,7 +167,7 @@ def wait
173167
require "pry"
174168
return binding.pry
175169
end,
176-
"agent2" => lambda do
170+
"agent" => lambda do
177171
require "logstash/agent2"
178172
# Hack up a runner
179173
runner = Class.new do
@@ -182,7 +176,7 @@ def initialize(args)
182176
end
183177
def run
184178
@thread = Thread.new do
185-
@result = LogStash::Agent2.run($0, @args)
179+
@result = LogStash::Agent.run($0, @args)
186180
end
187181
end
188182
def wait

0 commit comments

Comments
 (0)