Inject STDOUT by default in CommonLogHandler
This commit is contained in:
parent
98efbfe341
commit
1705852f25
|
@ -2,7 +2,7 @@ module Kemal
|
|||
class CommonLogHandler < Kemal::BaseLogHandler
|
||||
@handler : IO
|
||||
|
||||
def initialize(io : IO)
|
||||
def initialize(io : IO = STDOUT)
|
||||
@handler = io
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue