| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Web.Spock.Logging
Description
Request correlation and structured logging, independent of any logger
library. Enable through sc_logging or use the middleware
directly in a WAI application.
Documentation
data LoggingConfig Source #
Constructors
| LoggingConfig | |
Fields
| |
defaultLoggingConfig :: (LogEvent -> IO ()) -> LoggingConfig Source #
data RequestContext Source #
Constructors
| RequestContext | |
Instances
| Eq RequestContext Source # | |
Defined in Web.Spock.Logging Methods (==) :: RequestContext -> RequestContext -> Bool (/=) :: RequestContext -> RequestContext -> Bool | |
| Show RequestContext Source # | |
Defined in Web.Spock.Logging Methods showsPrec :: Int -> RequestContext -> ShowS show :: RequestContext -> String showList :: [RequestContext] -> ShowS | |
Constructors
| LogDebug | |
| LogInfo | |
| LogWarning | |
| LogError |
Constructors
| LogEvent | |
Fields | |
data LogEventType Source #
Constructors
| AccessLog Int Word64 | Status and elapsed microseconds until the response is available. Streaming body transmission is not included in the duration. |
| MessageLog LogLevel Text [(Text, Value)] | |
| ErrorLog Text |
Instances
| Eq LogEventType Source # | |
Defined in Web.Spock.Logging | |
| Show LogEventType Source # | |
Defined in Web.Spock.Logging Methods showsPrec :: Int -> LogEventType -> ShowS show :: LogEventType -> String showList :: [LogEventType] -> ShowS | |
data RequestLogger Source #
lookupRequestLogger :: RequestLogger -> Request -> Maybe (RequestContext, LogEventType -> IO ()) Source #
emitRequestLog :: RequestLogger -> RequestContext -> LogEventType -> IO () Source #