Class: GlTail::Source::Local
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#add_activity, #add_event, #initialize
Methods included from Configurable
#config_rewrite_color, included
Constructor Details
This class inherits a constructor from GlTail::Source::Base
Instance Method Details
#init ⇒ Object
10 11 12 13 14 15 |
# File 'lib/gl_tail/sources/local.rb', line 10 def init @log = File.open(files) @log.extend(File::Tail) @log.max_interval = 5 @log.return_if_eof = true end |
#process ⇒ Object
17 18 19 20 21 |
# File 'lib/gl_tail/sources/local.rb', line 17 def process @log.tail(1) { |line| parser.parse(line) } end |
#update ⇒ Object
23 24 |
# File 'lib/gl_tail/sources/local.rb', line 23 def update end |