class Fluent::TextParser::NodejsBunyanParser
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::TextParser::JSONishParser#configure
# File lib/fluent/plugin/parser_nodejs_bunyan.rb, line 8 def configure(conf) super(conf) @time_key = 'time' @message_key = 'msg' @move_keys.update({ 'v' => nil, 'msg' => nil, 'hostname' => 'host' }) end
parse(text) { |time, record| ... }
click to toggle source
Calls superclass method
Fluent::TextParser::JSONishParser#parse
# File lib/fluent/plugin/parser_nodejs_bunyan.rb, line 15 def parse(text) super(text) do |time, record| # Map the developer-defined levels to syslog levels. record['level'] = 8+(record['level']<=30?1:0)-(record['level']/10) yield time, record end end