Class: ActiveSupport::TaggedLogging

Inherits:
Object
  • Object
show all
Defined in:
lib/logjam_agent/buffered_logger.rb

Overview

monkey patch to handle exceptions correctly not needed for rails 4 as this uses a Formatter to add the tags

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ TaggedLogging

Returns a new instance of TaggedLogging.



11
12
13
14
15
16
17
18
19
20
# File 'lib/logjam_agent/buffered_logger.rb', line 11

def initialize(logger)
  @logger = logger
  if logger.is_a?(LogjamAgent::BufferedLogger)
    self.class.class_eval "def add(severity, message = nil, progname = nil, &block)\[email protected](severity, message, progname, tags_text, &block)\nend\n", __FILE__, __LINE__ + 1
  end
end