Class: Rack::ActionLogger::EmitAdapter::LoggerAdapter

Inherits:
Base
  • Object
show all
Defined in:
lib/rack/action_logger/emit_adapter/logger_adapter.rb

Class Method Summary collapse

Methods inherited from Base

wrap

Class Method Details

.emit(hash) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/rack/action_logger/emit_adapter/logger_adapter.rb', line 6

def self.emit(hash)
  hash = wrap(hash)
  if Rack::ActionLogger.configuration.pretty_print
    Rack::ActionLogger.logger.info(JSON.pretty_generate(hash))
  else
    Rack::ActionLogger.logger.info(hash)
  end
end