bin/multilog-collector.rb in multilog-collector-0.2.0 vs bin/multilog-collector.rb in multilog-collector-0.3.0

- old
+ new

@@ -3,12 +3,15 @@ $:.unshift(File.dirname(__FILE__) + '/../lib') require 'djb/daemontools/multilog/collector' directory = "/service" +collector = Djb::Daemontools::Multilog::Collector.new opt = OptionParser.new opt.on('--help', 'show this message') { puts opt; exit } -opt.on('-d DIR','--directory=DIR','service directory default: /service'){ |v| directory = v } +opt.on('-d DIR','--directory=DIR','service directory default: /service'){ |v| collector.directory = v } +opt.on('-l N','--lines=N','lines to collect default: 100'){ |v| collector.lines = v.to_i } opt.parse!(ARGV) -puts Djb::Daemontools::Multilog::Collector.new(directory).collect +puts collector.collect +