Class: Fluent::TextFormatter::IvideonLogsFormatter
- Inherits:
-
Formatter
- Object
- Formatter
- Fluent::TextFormatter::IvideonLogsFormatter
- Defined in:
- lib/fluent/plugin/formatter_std.rb
Instance Method Summary collapse
Instance Method Details
#format(tag, time, record) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/fluent/plugin/formatter_std.rb', line 8 def format(tag, time, record) if record["stack_trace"] == "None" maybe_tb = "" else maybe_tb = "%s\n" % [record["stack_trace"]] end return "[%s][%s][%s][%s][pid=%s]: %s\n%s" % [ record["time_"], record["level"], record["host"], record["module_"], record["pid"], record["raw"], maybe_tb ] end |