Module: Timber::Overrides::ActiveSupportTaggedLogging::LoggerMethods
- Defined in:
- lib/timber-rails/overrides/active_support_tagged_logging.rb
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/timber-rails/overrides/active_support_tagged_logging.rb', line 33 def self.included(klass) klass.class_eval do def add(severity, = nil, progname = nil, &block) if .nil? if block_given? = block.call else = progname progname = nil #No instance variable for this like Logger end end if @logger.is_a?(Timber::Logger) @logger.add(severity, , progname) else @logger.add(severity, "#{}#{}", progname) end end end end |