Safe Haskell | None |
---|
Network.Wai.Middleware.RequestLogger
- logStdout :: Middleware
- logStdoutDev :: Middleware
- mkRequestLogger :: RequestLoggerSettings -> IO Middleware
- data RequestLoggerSettings
- outputFormat :: RequestLoggerSettings -> OutputFormat
- autoFlush :: RequestLoggerSettings -> Bool
- destination :: RequestLoggerSettings -> Destination
- data OutputFormat
- type OutputFormatter = ZonedDate -> Request -> Status -> Maybe Integer -> [LogStr]
- data Destination
- type Callback = [LogStr] -> IO ()
- data IPAddrSource
- = FromSocket
- | FromHeader
Basic stdout logging
Production request logger middleware.
Implemented on top of logCallback, but prints to stdout
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
Instances
outputFormat :: RequestLoggerSettings -> OutputFormat
Default value: Detailed
True
.
autoFlush :: RequestLoggerSettings -> Bool
Only applies when using the Handle
constructor for destination
.
Default value: True
.
destination :: RequestLoggerSettings -> Destination
Default: Handle
stdout
.
data OutputFormat
Constructors
Apache IPAddrSource | |
Detailed Bool | use colors? |
CustomOutputFormat OutputFormatter |
data IPAddrSource
Source from which the IP source address of the client is obtained.
Constructors
FromSocket | From the peer address of the HTTP connection. |
FromHeader | From X-Real-IP: or X-Forwarded-For: in the HTTP header. |