Module: Wildcloud::Logeen::Transport::Syslog
- Includes:
- EventMachine::Protocols::LineText2
- Defined in:
- lib/wildcloud/logeen/transport/syslog.rb
Instance Method Summary collapse
Instance Method Details
#initialize(engine) ⇒ Object
11 12 13 |
# File 'lib/wildcloud/logeen/transport/syslog.rb', line 11 def initialize(engine) @engine = engine end |
#post_init ⇒ Object
15 16 17 |
# File 'lib/wildcloud/logeen/transport/syslog.rb', line 15 def post_init end |
#receive_line(data) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/wildcloud/logeen/transport/syslog.rb', line 19 def receive_line(data) = SyslogProtocol.parse(data) @engine << { "level" => .severity_name, "application" => .hostname, "component" => .facility_name, "message" => .content, "timestamp" => .time.to_i } end |
#unbind ⇒ Object
30 31 32 |
# File 'lib/wildcloud/logeen/transport/syslog.rb', line 30 def unbind end |