Class: Logfoo::LogfmtFormatter
- Inherits:
-
Object
- Object
- Logfoo::LogfmtFormatter
- Defined in:
- lib/logfoo/formatters/logfmt_formatter.rb
Direct Known Subclasses
Constant Summary collapse
- UNESCAPED_STRING =
/\A[\w\.\-\+\%\,\:\;\/]*\z/i.freeze
- STACKTRACE_RE =
/^(.+?):(\d+):in `(.+)'$/.freeze
- IGNORED_KEYS =
[:time]
- FLOAT_FORMAT =
'%0.4f'.freeze
Instance Method Summary collapse
Instance Method Details
#call(entry) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/logfoo/formatters/logfmt_formatter.rb', line 11 def call(entry) case entry when ExceptionEntry, Entry format_entry(entry) else "#{remove_nl entry.to_s}\n" end end |