Sha256: fa101c8361191049acd9c05f3a0f6df3a2acdc19e2c9e4484dcbd41a44a2ddaa
Contents?: true
Size: 967 Bytes
Versions: 5
Compression:
Stored size: 967 Bytes
Contents
module RooOnRails module Railties class Logging < Rails::Railtie initializer 'roo_on_rails.logging.before', before: :initialize_logger do require 'roo_on_rails/logger' Rails.logger = config.logger = RooOnRails::Logger.new # It is not possible to set log_level to an invalid value without some # deliberate gymnastics (the setter will raise an error), and Rails # defaults this to `debug`, so we don't need to guard against nil / # invalidity log_level = Rails.configuration.log_level Rails.logger.set_log_level(default: log_level) Rails.logger.debug 'initializer roo_on_rails.logging.before' end initializer 'roo_on_rails.logging.after', after: :initialize_logger do log_level = Rails.configuration.log_level Rails.logger.set_log_level(default: log_level) Rails.logger.debug 'initializer roo_on_rails.logging.after' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems