wai-extra-3.0.7.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

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.

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

data Destination Source

Constructors

Handle Handle 
Logger LoggerSet 
Callback Callback 

type Callback = LogStr -> IO () Source