wai-extra-1.0.0: Provides some basic WAI handlers and middleware.

Network.Wai.Middleware.RequestLogger

Synopsis

Documentation

logStdout :: MiddlewareSource

like logHandle, but prints to stdout

logHandle :: (ByteString -> IO ()) -> MiddlewareSource

Prints a message using the given callback function for each request. Designed for fast production use at the expense of convenience. In particular, no POST parameter information is currently given

logStdoutDev :: MiddlewareSource

like logHandleDev, but prints to stdout

Note that this flushes stdout on each call to make it useful for development. This is very inefficient for production use.

logHandleDev :: (ByteString -> IO ()) -> MiddlewareSource

Prints a message using the given callback function for each request. This is not for serious production use- it is inefficient. It immediately consumes a POST body and fills it back in and is otherwise inefficient

Note that this function will not flush output.

logStdoutDevLT :: MiddlewareSource

Inefficient, but convenient Development load logger middleware Prints a message to stderr for each request using logHandleDevLT

logHandleDevLT :: (Text -> IO ()) -> MiddlewareSource

logHandleDev, but expects Lazy Text instead of a ByteString