Sha256: 06fb40d650f423c4c5c72e9d21cb10dfa0bb7867965332a9b26e883a3a4b6ff7

Contents?: true

Size: 385 Bytes

Versions: 11

Compression:

Stored size: 385 Bytes

Contents

require 'json'
require 'rack/action_logger/emit_adapter/base'

module Rack::ActionLogger::EmitAdapter
  class LoggerAdapter < Base
    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
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rack-action_logger-0.4.0 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.3.0 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.2.0 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.9 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.8 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.7 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.6 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.5 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.4 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.3 lib/rack/action_logger/emit_adapter/logger_adapter.rb
rack-action_logger-0.1.2 lib/rack/action_logger/emit_adapter/logger_adapter.rb