Class: FluentParseAuditLogFilter

Inherits:
Fluent::Filter
  • Object
show all
Defined in:
lib/fluent/plugin/filter_parse_audit_log.rb

Instance Method Summary collapse

Instance Method Details

#filter(tag, time, record) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/fluent/plugin/filter_parse_audit_log.rb', line 10

def filter(tag, time, record)
  line = record[@key]
  return record unless line
  AuditLogParser.parse_line(line, flatten: @flatten)
rescue => e
  log.warn "failed to parse a audit log: #{line}", error_class: e.class, error: e.message
  log.warn_backtrace
  record
end