lib/bixby-common/util/log.rb in bixby-common-0.4.8 vs lib/bixby-common/util/log.rb in bixby-common-0.4.9
- old
+ new
@@ -36,10 +36,10 @@
# @option opts [Symbol] :level Log level to use (default = :warn)
# @option opts [String] :pattern Log pattern
def self.setup_logger(opts={})
# set level: ENV flag overrides; default to warn
- opts[:level] = :debug if ENV["BIXBY_DEBUG"]
+ opts[:level] = ENV["BIXBY_LOG"] if ENV["BIXBY_LOG"]
opts[:level] ||= :warn
pattern = opts.delete(:pattern) || '%.1l, [%d] %5l -- %c:%L: %m\n'
layout = Logging.layouts.pattern(:pattern => pattern)