Spock-core
Safe HaskellNone
LanguageHaskell2010

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

data RequestContext Source #

Constructors

RequestContext 

Fields

Instances

Instances details
Eq RequestContext Source # 
Instance details

Defined in Web.Spock.Logging

Show RequestContext Source # 
Instance details

Defined in Web.Spock.Logging

Methods

showsPrec :: Int -> RequestContext -> ShowS

show :: RequestContext -> String

showList :: [RequestContext] -> ShowS

data LogLevel Source #

Instances

Instances details
Eq LogLevel Source # 
Instance details

Defined in Web.Spock.Logging

Methods

(==) :: LogLevel -> LogLevel -> Bool

(/=) :: LogLevel -> LogLevel -> Bool

Show LogLevel Source # 
Instance details

Defined in Web.Spock.Logging

Methods

showsPrec :: Int -> LogLevel -> ShowS

show :: LogLevel -> String

showList :: [LogLevel] -> ShowS

data LogEvent Source #

Instances

Instances details
Eq LogEvent Source # 
Instance details

Defined in Web.Spock.Logging

Methods

(==) :: LogEvent -> LogEvent -> Bool

(/=) :: LogEvent -> LogEvent -> Bool

Show LogEvent Source # 
Instance details

Defined in Web.Spock.Logging

Methods

showsPrec :: Int -> LogEvent -> ShowS

show :: LogEvent -> String

showList :: [LogEvent] -> ShowS

ToJSON LogEvent Source # 
Instance details

Defined in Web.Spock.Logging

Methods

toJSON :: LogEvent -> Value

toEncoding :: LogEvent -> Encoding

toJSONList :: [LogEvent] -> Value

toEncodingList :: [LogEvent] -> Encoding

omitField :: LogEvent -> Bool

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

Instances details
Eq LogEventType Source # 
Instance details

Defined in Web.Spock.Logging

Methods

(==) :: LogEventType -> LogEventType -> Bool

(/=) :: LogEventType -> LogEventType -> Bool

Show LogEventType Source # 
Instance details

Defined in Web.Spock.Logging

Methods

showsPrec :: Int -> LogEventType -> ShowS

show :: LogEventType -> String

showList :: [LogEventType] -> ShowS