Add flush on newline Fixes #15

This commit is contained in:
Sdogruyol 2015-11-21 22:46:37 +02:00
parent 173bbf7639
commit 9cb3cafa62
2 changed files with 5 additions and 4 deletions

View file

@ -4,7 +4,9 @@ class Kemal::Logger < HTTP::Handler
def initialize
@env = Kemal.config.env
@handler = if @env == "production"
File.new("kemal.log", "a")
handler = File.new("kemal.log", "a")
handler.flush_on_newline = true
handler
else
STDOUT
end