Sha256: 73bc61ab0f33394e0f6229ea473007c7a659f442710c80a093af3d264c6440f2

Contents?: true

Size: 620 Bytes

Versions: 6

Compression:

Stored size: 620 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
      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

6 entries across 6 versions & 1 rubygems

Version Path
instana-1.7.1 lib/instana/logger.rb
instana-1.7.0 lib/instana/logger.rb
instana-1.6.1 lib/instana/logger.rb
instana-1.6.0 lib/instana/logger.rb
instana-1.5.2 lib/instana/logger.rb
instana-1.5.1 lib/instana/logger.rb