def log(log, message = nil, progname = nil, &block)
      # Compatibility with ::Logger
      return add(log, message, progname, &block) unless log.is_a?(Sapience::Log)
      if @@appender_thread
        @@appender_thread << lambda do
          Sapience.appenders.each do |appender|
            next unless appender.valid?
            begin
              appender.log(log)
            rescue StandardError => exc
              $stderr.write("Appender thread: Failed to log to appender: #{appender.inspect}\n #{exc.inspect}")
            end
          end
          Sapience.clear_tags!
        end
      end
    end
def log(log, message = nil, progname = nil, &block)
      # Compatibility with ::Logger
      return add(log, message, progname, &block) unless log.is_a?(Sapience::Log)
      if @@appender_thread
        @@appender_thread << lambda do
          Sapience.appenders.each do |appender|
            next unless appender.valid?
            begin
              appender.log(log)
            rescue StandardError => exc
              $stderr.write("Appender thread: Failed to log to appender: #{appender.inspect}\n #{exc.inspect}")
            end
          end
          Sapience.clear_tags!
        end
      end
    end
def log ( log , message = nil , progname = nil , & block ) # Compatibility with ::Logger return add ( log , message , progname , block ) unless log . is_a? ( Sapience :: Log ) if @@appender_thread @@appender_thread << lambda do Sapience . appenders . each do | appender | next unless appender . valid? begin appender . log ( log ) rescue StandardError => exc $stderr . write ( "Appender thread: Failed to log to appender: #{appender.inspect}\n #{exc.inspect}" ) end end Sapience . clear_tags! end end end
Returns a Logger instance

 Return the logger for a specific class, supports class specific log levels
   logger = Sapience::Logger.new(self)
 OR
   logger = Sapience::Logger.new('MyClass')

 Parameters:
  application
    A class, module or a string with the application/class name
    to be used in the logger

  level
    The initial log level to start with for this logger instance
    Default: Sapience.config.default_level

  filter [Regexp|Proc]
    RegExp: Only include log messages where the class name matches the supplied
    regular expression. All other messages will be ignored
    Proc: Only include log messages where the supplied Proc returns true
          The Proc must return true or false
 Place log request on the queue for the Appender thread to write to each
 appender in the order that they were registered
Returns a Logger instance