| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
- type OutputFormatterWithDetails = ZonedDate -> Request -> Status -> Maybe Integer -> NominalDiffTime -> [ByteString] -> Builder -> LogStr
- data Destination
- type Callback = LogStr -> IO ()
- data IPAddrSource :: *
Basic stdout logging
logStdout :: Middleware Source
Production request logger middleware.
This uses the Apache logging format, and takes IP addresses for clients from
the socket (see IPAddrSource for more information). It logs to stdout.
logStdoutDev :: Middleware Source
Create more versions
mkRequestLogger :: RequestLoggerSettings -> IO Middleware Source
data RequestLoggerSettings Source
RequestLoggerSettings is an instance of Default. See Data.Default for more information.
outputFormat, autoFlush, and destination are record fields
for the record type RequestLoggerSettings, so they can be used to
modify settings values using record syntax.
Instances
outputFormat :: RequestLoggerSettings -> OutputFormat Source
Default value: Detailed True.
autoFlush :: RequestLoggerSettings -> Bool Source
Only applies when using the Handle constructor for destination.
Default value: True.
destination :: RequestLoggerSettings -> Destination Source
Default: Handle stdout.
data OutputFormat Source
type OutputFormatter = ZonedDate -> Request -> Status -> Maybe Integer -> LogStr Source
type OutputFormatterWithDetails = ZonedDate -> Request -> Status -> Maybe Integer -> NominalDiffTime -> [ByteString] -> Builder -> LogStr Source
data IPAddrSource :: *
Constructors
| FromSocket | |
| FromHeader | |
| FromFallback |