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 class CommonLogHandler < Kemal::BaseLogHandler
@handler : IO @handler : IO
def initialize(io : IO) def initialize(io : IO = STDOUT)
@handler = io @handler = io
end end

View file

@ -74,7 +74,7 @@ module Kemal
private def setup_log_handler private def setup_log_handler
@logger ||= if @logging @logger ||= if @logging
Kemal::CommonLogHandler.new(STDOUT) Kemal::CommonLogHandler.new
else else
Kemal::NullLogHandler.new Kemal::NullLogHandler.new
end end