| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Log.Class
Description
The MonadLog type class of monads with logging capabilities.
- data UTCTime :: *
- class Monad m => MonadTime m where
- class MonadTime m => MonadLog m where
- logAttention :: (MonadLog m, ToJSON a) => Text -> a -> m ()
- logInfo :: (MonadLog m, ToJSON a) => Text -> a -> m ()
- logTrace :: (MonadLog m, ToJSON a) => Text -> a -> m ()
- logAttention_ :: MonadLog m => Text -> m ()
- logInfo_ :: MonadLog m => Text -> m ()
- logTrace_ :: MonadLog m => Text -> m ()
Documentation
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
class Monad m => MonadTime m where #
Class of monads which carry the notion of the current time.
Minimal complete definition
Methods
currentTime :: m UTCTime #
class MonadTime m => MonadLog m where Source #
Represents the family of monads with logging capabilities. Each
MonadLog carries with it some associated state (the logging
environment) that can be modified locally with localData and
localDomain.
Minimal complete definition
logAttention :: (MonadLog m, ToJSON a) => Text -> a -> m () Source #
Log a message and its associated data using current time as the
event time and the LogAttention log level.
logInfo :: (MonadLog m, ToJSON a) => Text -> a -> m () Source #
Log a message and its associated data using current time as the
event time and the LogInfo log level.
logTrace :: (MonadLog m, ToJSON a) => Text -> a -> m () Source #
Log a message and its associated data using current time as the
event time and the LogTrace log level.
logAttention_ :: MonadLog m => Text -> m () Source #
Like logAttention, but without any additional associated data.