on master help sign in
Force log flushing after each message yesodweb/yesod#647
d4e843bMichael Snoyman
wai-extra/Network/Wai/Middleware/RequestLogger.hs+3−1
@@ -82,7 +82,9 @@ mkRequestLogger RequestLoggerSettings{..} = do
82 callback <-
82 callback <-
83 case destination of
83 case destination of
84 Handle h -> return $ BS.hPutStr h . logToByteString
84 Handle h -> return $ BS.hPutStr h . logToByteString
85− Logger l -> return $ pushLogStr l
85+ Logger l -> return $ \msg -> do
86+ pushLogStr l msg
87+ flushLogStr l
86 Callback c -> return c
88 Callback c -> return c
87 case outputFormat of
89 case outputFormat of
88 Apache ipsrc -> do
90 Apache ipsrc -> do
wai-extra/wai-extra.cabal+1−1
@@ -1,5 +1,5 @@
1Name: wai-extra
1Name: wai-extra
2−Version: 2.0.1.2
2+Version: 2.0.1.3
3Synopsis: Provides some basic WAI handlers and middleware.
3Synopsis: Provides some basic WAI handlers and middleware.
4Description: The goal here is to provide common features without many dependencies.
4Description: The goal here is to provide common features without many dependencies.
5License: MIT
5License: MIT