yesodweb/yesod — Issue #269: Apache-style logging of requests
Author: meteficha
Created: 2012-02-14 09:40:13+00:00
State: open
Labels: Feature Request

Is there any reason why we're not using @kazu-yamamoto's Apache-style logger by default? Currently I'm using:

```haskell
import qualified Network.Wai as W
import qualified Network.Wai.Logger as WL -- wai-logger >= 0.1.3

apacheLoggingMiddleware :: IO W.Middleware
apacheLoggingMiddleware = do
apacheLogger <- WL.stdoutApacheLoggerInit WL.FromSocket
return $
\app ->
\req -> do
resp <- app req
let status = case resp of
W.ResponseFile s _h _ _ -> s
W.ResponseBuilder s _h _ -> s
W.ResponseSource s _h _ -> s
len = Nothing
liftIO $ apacheLogger req status len
return resp
```