Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ThreadTimeMessage = ThreadTimeMessage {}
- class HasSeverity msg where
- getSeverity :: msg -> Severity
- ttmSeverity :: ThreadTimeMessage -> Severity
- addThreadAndTimeToLog :: Members '[Embed IO, Log ThreadTimeMessage] r => Sem (Log Message ': r) a -> Sem r a
Documentation
data ThreadTimeMessage Source #
Instances
ttmSeverity :: ThreadTimeMessage -> Severity Source #
Get the severity of the message.
addThreadAndTimeToLog :: Members '[Embed IO, Log ThreadTimeMessage] r => Sem (Log Message ': r) a -> Sem r a Source #
Add the thread id and a timestamp to messages in the log.
This should be called before any use of asyncToIO
, otherwise all log messages will have the same thread id.
It is best called after any use of filterLogs
, otherwise you're needlessly processing messages that will never be logged (TODO: test this assertion is true).