Class: Fluent::WerkzeugProfilerInput
- Inherits:
-
TailInput
- Object
- TailInput
- Fluent::WerkzeugProfilerInput
- Defined in:
- lib/fluent/plugin/in_werkzeug_profiler.rb
Defined Under Namespace
Classes: WerkzeugProfilerParser
Instance Method Summary collapse
-
#configure_parser(conf) ⇒ Object
override.
-
#receive_lines(lines) ⇒ Object
override.
Instance Method Details
#configure_parser(conf) ⇒ Object
override
7 8 9 |
# File 'lib/fluent/plugin/in_werkzeug_profiler.rb', line 7 def configure_parser(conf) @parser = WerkzeugProfilerParser.new end |
#receive_lines(lines) ⇒ Object
override
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/in_werkzeug_profiler.rb', line 12 def receive_lines(lines) es = MultiEventStream.new for line in @parser.divide(lines) do begin time, record = parse_line(line) if time && record es.add(time, record) end rescue $log.warn line.dump, :error=>$!.to_s $log.debug_backtrace end end unless es.empty? Engine.emit_stream(@tag, es) end end |