Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (MonadIO m, MonadMask m) => MonadLog m where
- newtype LogT m a = LogT {}
- noLog :: (MonadIO m, MonadMask m) => LogT m a -> m a
- withLog :: Log -> LogT m a -> m a
- runLog :: (MonadIO m, MonadMask m) => LogConfig -> [LogHandler] -> LogT m a -> m a
- askComponent :: MonadLog m => m Component
- askScope :: MonadLog m => m Scope
- log :: MonadLog m => Level -> Text -> m ()
- sendLog :: MonadLog m => Level -> Text -> m ()
- component :: MonadLog m => Text -> m a -> m a
- scope_ :: MonadLog m => Text -> m a -> m a
- scope :: MonadLog m => Text -> m a -> m a
- scopeM :: (MonadLog m, MonadError e m, Show e) => Text -> m a -> m a
- scoper :: (MonadLog m, Show a) => Text -> m a -> m a
- scoperM :: (MonadLog m, MonadError e m, Show e, Show a) => Text -> m a -> m a
- trace :: (MonadLog m, Show a) => Text -> m a -> m a
- modifyLogConfig :: MonadLog m => (LogConfig -> LogConfig) -> m LogConfig
- modifyLogHandlers :: MonadLog m => ([LogHandler] -> [LogHandler]) -> m ()
Documentation
Monad log
MonadTrans LogT Source # | |
Monad m => MonadReader Log (LogT m) Source # | |
Monad m => Monad (LogT m) Source # | |
Functor m => Functor (LogT m) Source # | |
Applicative m => Applicative (LogT m) Source # | |
MonadIO m => MonadIO (LogT m) Source # | |
MonadThrow m => MonadThrow (LogT m) Source # | |
MonadCatch m => MonadCatch (LogT m) Source # | |
MonadMask m => MonadMask (LogT m) Source # | |
(MonadIO m, MonadMask m) => MonadLog (LogT m) Source # | |
runLog :: (MonadIO m, MonadMask m) => LogConfig -> [LogHandler] -> LogT m a -> m a Source #
Run LogT
monad with log config and handlers
Getters
askComponent :: MonadLog m => m Component Source #
Ask current component
Log functions
scopeM :: (MonadLog m, MonadError e m, Show e) => Text -> m a -> m a Source #
Scope with log exception from MonadError
modifyLogConfig :: MonadLog m => (LogConfig -> LogConfig) -> m LogConfig Source #
Modify config, same as updateLogConfig
, but within MonadLog
modifyLogHandlers :: MonadLog m => ([LogHandler] -> [LogHandler]) -> m () Source #
Modify handlers, same as updateLogHandlers
, but within MonadLog