diff --git a/src/kemal/common_log_handler.cr b/src/kemal/common_log_handler.cr index 016f844..5fd31e5 100644 --- a/src/kemal/common_log_handler.cr +++ b/src/kemal/common_log_handler.cr @@ -2,7 +2,7 @@ module Kemal class CommonLogHandler < Kemal::BaseLogHandler @handler : IO - def initialize(io : IO) + def initialize(io : IO = STDOUT) @handler = io end diff --git a/src/kemal/config.cr b/src/kemal/config.cr index 1e8bc6f..4583cf4 100644 --- a/src/kemal/config.cr +++ b/src/kemal/config.cr @@ -74,7 +74,7 @@ module Kemal private def setup_log_handler @logger ||= if @logging - Kemal::CommonLogHandler.new(STDOUT) + Kemal::CommonLogHandler.new else Kemal::NullLogHandler.new end