Class: Fluent::TextParser::NodejsBunyanParser
Instance Method Summary
collapse
#initialize
Instance Method Details
8
9
10
11
12
13
|
# 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) ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/fluent/plugin/parser_nodejs_bunyan.rb', line 15
def parse(text)
super(text) do |time, record|
record['level'] = 8+(record['level']<=30?1:0)-(record['level']/10)
yield time, record
end
end
|