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

Safe HaskellNone




Basic stdout logging

logStdout :: MiddlewareSource

Production request logger middleware. Implemented on top of logCallback, but prints to stdout

logStdoutDev :: MiddlewareSource

Development request logger middleware. Implemented on top of logCallbackDev, but prints to stdout

Flushes stdout on each request, which would be inefficient in production use. Use logStdout in production.

Create more versions

outputFormat :: RequestLoggerSettings -> OutputFormatSource

Default value: Detailed True.

autoFlush :: RequestLoggerSettings -> BoolSource

Only applies when using the Handle constructor for destination.

Default value: True.

type Callback = [LogStr] -> IO ()Source

data IPAddrSource

Source from which the IP source address of the client is obtained.



From the peer address of the HTTP connection.


From X-Real-IP: or X-Forwarded-For: in the HTTP header.