mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Inject STDOUT by default in CommonLogHandler
This commit is contained in:
parent
98efbfe341
commit
1705852f25
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue