Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
generic, thread safe logging
Synopsis
- newtype GenericLoggingC m a = MkGenericLoggingC {
- runGenericLoggingC :: TChan LogMsg -> m a
- runGenericLogging :: MonadUnliftIO m => (LogMsg -> m ()) -> GenericLoggingC m a -> m a
- runStdoutLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a
- runColourLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a
Documentation
newtype GenericLoggingC m a Source #
MkGenericLoggingC | |
|
Instances
:: MonadUnliftIO m | |
=> (LogMsg -> m ()) | what to do with a log message |
-> GenericLoggingC m a | the action |
-> m a |
runStdoutLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a Source #
log to stdout, supports concurrency
runColourLogging :: MonadUnliftIO m => GenericLoggingC m a -> m a Source #
logs to stdout, supports concurrency, logs are printed in colours according to the severity