Inject STDOUT by default in CommonLogHandler

This commit is contained in:
Sdogruyol 2016-08-01 23:21:19 +03:00
parent 98efbfe341
commit 1705852f25
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ module Kemal
class CommonLogHandler < Kemal::BaseLogHandler
@handler : IO
def initialize(io : IO)
def initialize(io : IO = STDOUT)
@handler = io
end

View File

@ -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