Module: RequestTrail::Formatters::Base
- Included in:
- RequestTrail::Formatter, FlameGraph
- Defined in:
- lib/request_trail/formatters/base.rb
Overview
Mixin that documents the formatter duck-type contract. Include it in custom formatters to make the interface explicit; the only required method is #format(request, collector) -> String.
Instance Method Summary collapse
-
#format(_request, _collector) ⇒ String
The log line(s) to emit.
Instance Method Details
#format(_request, _collector) ⇒ String
Returns the log line(s) to emit.
12 13 14 |
# File 'lib/request_trail/formatters/base.rb', line 12 def format(_request, _collector) raise NotImplementedError, "#{self.class}#format must return a String" end |