Class: EventLoggerRails::Formatters::JSON
- Inherits:
-
ActiveSupport::Logger::SimpleFormatter
- Object
- ActiveSupport::Logger::SimpleFormatter
- EventLoggerRails::Formatters::JSON
- Defined in:
- lib/event_logger_rails/formatters/json.rb
Overview
Writes log entries in JSON format
Instance Method Summary collapse
-
#call(level, timestamp, _progname, message) ⇒ String
Returns the formatted output for logging.
Instance Method Details
#call(level, timestamp, _progname, message) ⇒ String
Returns the formatted output for logging.
14 15 16 17 |
# File 'lib/event_logger_rails/formatters/json.rb', line 14 def call(level, , _progname, ) output = Output.new(level:, timestamp:, message:) "#{output.to_json}\n" end |