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

Safe HaskellNone
LanguageHaskell2010

Network.Wai.Middleware.RequestLogger

Contents

Synopsis

Basic stdout logging

logStdout :: Middleware #

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 #

Development request logger middleware.

This uses the Detailed True logging format and logs to stdout.

Create more versions

data RequestLoggerSettings #

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 #

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.

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

type OutputFormatterWithDetails = ZonedDate -> Request -> Status -> Maybe Integer -> NominalDiffTime -> [ByteString] -> Builder -> LogStr #

data Destination #

Constructors

Handle Handle 
Logger LoggerSet 
Callback Callback 

type Callback = LogStr -> IO () #