Sha256: 6258bd1e8a4d2c72c9b204bec47e960d3d530f81ec896ba3a368752340151be2
Contents?: true
Size: 428 Bytes
Versions: 2
Compression:
Stored size: 428 Bytes
Contents
# encoding: UTF-8 require "logger" def init_logger(level = nil) $log = Logger.new(STDERR) $log.level = if level == nil if very_very_verbose? Logger::DEBUG elsif very_verbose? Logger::INFO elsif verbose? Logger::WARN else Logger::ERROR end else level end $log.formatter = proc do |severity, datetime, progname, msg| "#{severity.chars.first}: #{msg}\n" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gjp-0.6.0 | lib/gjp/logger.rb |
gjp-0.5.0 | lib/gjp/logger.rb |