lib/knapsack_pro/config/env.rb in knapsack_pro-0.15.2 vs lib/knapsack_pro/config/env.rb in knapsack_pro-0.16.0
- old
+ new
@@ -118,9 +118,17 @@
break unless value.nil?
end
value
end
+ def log_level
+ {
+ 'debug' => ::Logger::DEBUG,
+ 'info' => ::Logger::INFO,
+ 'warn' => ::Logger::WARN,
+ }[ENV['KNAPSACK_PRO_LOG_LEVEL']] || ::Logger::INFO
+ end
+
private
def required_env(env_name)
ENV[env_name] || raise("Missing environment variable #{env_name}")
end