Class: GetaroundUtils::Ougai::JsonFormatter
- Inherits:
-
Ougai::Formatters::Base
- Object
- Ougai::Formatters::Base
- GetaroundUtils::Ougai::JsonFormatter
- Defined in:
- lib/getaround_utils/ougai/json_formatter.rb
Instance Method Summary collapse
Instance Method Details
#_call(severity, _time, progname, data) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/getaround_utils/ougai/json_formatter.rb', line 11 def _call(severity, _time, progname, data) = data.delete(:msg) data = { caption: }.merge(data) \ unless == 'No message' payload = { severity: severity, progname: progname }.merge(data).compact "#{JSON.dump(payload)}\n" end |