Sha256: 858ee52cbdf33b4e8390ca4120d7459a81aee17955068b1e48c1542b5a5a30d5

Contents?: true

Size: 693 Bytes

Versions: 10

Compression:

Stored size: 693 Bytes

Contents

require "logger"

module Instana
  class XLogger < Logger
    STAMP = "Instana: ".freeze

    def initialize(*args)
      super(*args)
      if ENV.key?('INSTANA_GEM_TEST')
        self.level = Logger::DEBUG
      elsif ENV.key?('INSTANA_GEM_DEV')
        self.level = Logger::DEBUG
      elsif ENV.key?('INSTANA_QUIET')
        self.level = Logger::FATAL
      else
        self.level = Logger::WARN
      end
    end

    def error(msg)
      super(STAMP + msg)
    end

    def warn(msg)
      super(STAMP + msg)
    end

    def info(msg)
      super(STAMP + msg)
    end

    def debug(msg)
      super(STAMP + msg)
    end

    def unkown(msg)
      super(STAMP + msg)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
instana-1.7.11 lib/instana/logger.rb
instana-1.7.10 lib/instana/logger.rb
instana-1.7.9 lib/instana/logger.rb
instana-1.7.8 lib/instana/logger.rb
instana-1.7.7 lib/instana/logger.rb
instana-1.7.6 lib/instana/logger.rb
instana-1.7.5 lib/instana/logger.rb
instana-1.7.4 lib/instana/logger.rb
instana-1.7.3 lib/instana/logger.rb
instana-1.7.2 lib/instana/logger.rb