Make sure to instantiate null log handler

This commit is contained in:
Sdogruyol 2016-03-06 20:16:51 +02:00
parent c7d2b33bb3
commit e3c3154006

View file

@ -47,12 +47,12 @@ module Kemal
end end
def setup_logging def setup_logging
if @logging @logger = if @logging
@logger ||= Kemal::CommonLogHandler.new(@env) Kemal::CommonLogHandler.new(@env)
HANDLERS.insert(0, @logger.not_nil!) else
else Kemal::NullLogHandler.new(@env)
@logger = Kemal::NullLogHandler.new(@env) end
end HANDLERS.insert(0, @logger.not_nil!)
end end
private def setup_error_handler private def setup_error_handler