Class: Adminix::Helpers::LogReader
- Inherits:
-
EventMachine::FileTail
- Object
- EventMachine::FileTail
- Adminix::Helpers::LogReader
- Defined in:
- lib/adminix/helpers/log_reader.rb
Constant Summary
Constants inherited from EventMachine::FileTail
EventMachine::FileTail::CHUNKSIZE, EventMachine::FileTail::FORCE_ENCODING
Instance Attribute Summary
Attributes inherited from EventMachine::FileTail
#closed, #missing_file_check_interval, #path, #position, #symlink_check_interval
Instance Method Summary collapse
-
#initialize(path, startpos = -1)) ⇒ LogReader
constructor
A new instance of LogReader.
- #receive_data(data) ⇒ Object
Methods inherited from EventMachine::FileTail
#close, #closed?, #eof, #on_exception
Constructor Details
Instance Method Details
#receive_data(data) ⇒ Object
10 11 12 13 |
# File 'lib/adminix/helpers/log_reader.rb', line 10 def receive_data(data) lines = @buffer.extract(data) Services::LogsService.add_logs(Adminix.watcher, path, lines) end |