Only set @logger when not previously set

This came in contradiction with the docs.
This commit is contained in:
Jerome Gravel-Niquet 2016-04-11 10:54:59 -04:00
parent 65d0af5b5f
commit e407f52897
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ module Kemal
end
def setup_logging
@logger = if @logging
@logger ||= if @logging
Kemal::CommonLogHandler.new(@env)
else
Kemal::NullLogHandler.new(@env)