Sha256: bce8f92949ee7e437e4e1eeebd87a4528ae45e5d3ded23def47b49f488f60fcb
Contents?: true
Size: 607 Bytes
Versions: 6
Compression:
Stored size: 607 Bytes
Contents
require 'logger' module Hypertrace module Logging def log @_logger ||= begin l = Logger.new(STDOUT) l.level = get_level l.progname = 'Hypertrace' l end end private def get_level level_map = { "debug" => Logger::DEBUG, 'info' => Logger::INFO, 'warn' => Logger::WARN, 'error' => Logger::ERROR } level = Hypertrace::EnvVarSettings.env_value('LOG_LEVEL') || '' level_map.fetch(level.downcase, Logger::INFO) end end end
Version data entries
6 entries across 6 versions & 1 rubygems