Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Logger = LogEvent -> IO ()
- data LogEvent = LogEvent {}
- data LogEventType
- mmLoggerInfo :: Handle -> Logger
- mmLoggerInfoFilter :: (LogEvent -> Bool) -> Handle -> Logger
- mmLoggerDebug :: Handle -> Logger
- mmLoggerDebugFilter :: (LogEvent -> Bool) -> Handle -> Logger
- mmLoggerInfoErr :: Logger
- mmLoggerInfoFilterErr :: (LogEvent -> Bool) -> Logger
- mmLoggerDebugErr :: Logger
- mmLoggerDebugFilterErr :: (LogEvent -> Bool) -> Logger
Logging-Related Types
data LogEventType Source #
A LogEventType
describes the particular event that happened
HttpRequest RequestMethod String (Maybe Value) | |
HttpResponse Int String (Maybe Value) | |
WebSocketRequest Value | |
WebSocketResponse (Either String Value) | Left means we got an exception trying to parse the response; Right means we succeeded and here it is. |
WebSocketPing | |
WebSocketPong |
Basic Loggers
mmLoggerInfo :: Handle -> Logger Source #
mmLoggerInfo
prints which calls are happening and which
endpoints are being hit, but without the payloads.
mmLoggerInfoFilter :: (LogEvent -> Bool) -> Handle -> Logger Source #
mmLoggerInfoFilter
is the same as mmLoggerInfo
but takes
a user-defined predicate that it uses to select which events to
log before writing them to the provided Handle
mmLoggerDebug :: Handle -> Logger Source #
mmLoggerDebug
prints the full data of every logging event to
the provided Handle
.
mmLoggerDebugFilter :: (LogEvent -> Bool) -> Handle -> Logger Source #
mmLoggerDebugFilter
is the same as mmLoggerDebug
but takes
a user-defined predicate that it uses to select which events to
log before writing them to the provided Handle
stderr
variants
mmLoggerInfoErr :: Logger Source #
mmLoggerInfoErr
prints request/response data without payloads
to stderr
mmLoggerInfoFilterErr :: (LogEvent -> Bool) -> Logger Source #
mmLoggerInfoFilterErr
takes a user-defined predicate that
it uses to select which events to log before logging them to
stderr
.
mmLoggerDebugErr :: Logger Source #
mmLoggerDebugErr
prints the full data of every logging event
to stderr
.
mmLoggerDebugFilterErr :: (LogEvent -> Bool) -> Logger Source #
mmLoggerDebugFilterErr
takes a user-defined predicate that
it uses to select which events to log before logging them to
stderr
.