Class: SemanticLogger::Formatters::Logfmt
- Defined in:
- lib/semantic_logger/formatters/logfmt.rb
Instance Attribute Summary
Attributes inherited from Raw
Attributes inherited from Base
Instance Method Summary collapse
- #call(log, logger) ⇒ Object
-
#initialize(time_format: :iso_8601, time_key: :timestamp, **args) ⇒ Logfmt
constructor
A new instance of Logfmt.
Methods inherited from Raw
#application, #duration, #environment, #exception, #file_name_and_line, #host, #level, #message, #metric, #name, #named_tags, #payload, #pid, #tags, #thread_name, #time
Methods inherited from Base
#backtrace, #fast_tag, #level, #level=, #log, #measure, #named_tags, #pop_tags, #push_tags, #should_log?, #silence, #tagged, #tags
Constructor Details
#initialize(time_format: :iso_8601, time_key: :timestamp, **args) ⇒ Logfmt
Returns a new instance of Logfmt.
6 7 8 |
# File 'lib/semantic_logger/formatters/logfmt.rb', line 6 def initialize(time_format: :iso_8601, time_key: :timestamp, **args) super(time_format: time_format, time_key: time_key, **args) end |
Instance Method Details
#call(log, logger) ⇒ Object
10 11 12 13 14 |
# File 'lib/semantic_logger/formatters/logfmt.rb', line 10 def call(log, logger) @raw = super(log, logger) raw_to_logfmt end |