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

Safe HaskellNone
LanguageHaskell98

Network.Wai.Middleware.RequestLogger

Contents

Synopsis

Basic stdout logging

logStdout :: Middleware Source

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

logStdoutDev :: Middleware Source

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 -> OutputFormat Source

Default value: Detailed True.

autoFlush :: RequestLoggerSettings -> Bool Source

Only applies when using the Handle constructor for destination.

Default value: True.

type OutputFormatter = ZonedDate -> Request -> Status -> Maybe Integer -> LogStr Source

data Destination Source

Constructors

Handle Handle 
Logger LoggerSet 
Callback Callback 

type Callback = LogStr -> IO () Source