Class: GrapeLogging::Formatters::Lograge
- Inherits:
-
Object
- Object
- GrapeLogging::Formatters::Lograge
- Defined in:
- lib/grape_logging/formatters/lograge.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, datetime, _, data) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/grape_logging/formatters/lograge.rb', line 4 def call(severity, datetime, _, data) time = data.delete :time attributes = { severity: severity, duration: time[:total], db: time[:db], view: time[:view], datetime: datetime.iso8601 }.merge(data) ::Lograge.formatter.call(attributes) + "\n" end |