yesodweb/yesod — Issue #250: Yesod.Logger freezes when log message is too long
Author: luite
Created: 2012-01-31 22:01:44+00:00
State: open

probably a buffer overflow or something like that in fast-logger, needs a bit more investigation

~~~{.haskell}
module LoggerTest where

import qualified Yesod.Logger as Log
import qualified Data.ByteString as BS
import System.IO (hFlush, stdout)

main = do
logger <- Log.defaultDevelopmentLogger
mapM_ (logLength logger) [8050..8200]

logLength :: Log.Logger -> Int -> IO ()
logLength logger len = do
putStrLn $ "logging: " ++ show len
hFlush stdout
Log.logBS logger b
putStrLn "-----"
hFlush stdout
where
b = BS.pack $ replicate len 97
~~~

it freezes at 8095 here