Commit 78ad2573 authored by olb's avatar olb
Browse files

allow to change log level with LOG_LEVEL env variable for task logger

parent 481c801f
......@@ -24,10 +24,10 @@ module Utils::Logging
TASKS_LOGGER = TaskLogger.new(STDERR)
if Rails.env.development?
TASKS_LOGGER.level = Logger::DEBUG
TASKS_LOGGER.level = ENV.fetch("LOG_LEVEL", Logger::DEBUG)
elsif Rails.env.test?
TASKS_LOGGER.level = Logger::FATAL
TASKS_LOGGER.level = ENV.fetch("LOG_LEVEL", Logger::FATAL)
else
TASKS_LOGGER.level = Logger::INFO
TASKS_LOGGER.level = ENV.fetch("LOG_LEVEL", Logger::INFO)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment