| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Gitea.Logging
Description
Logging functions
Synopsis
- type LogExecWithContext = forall (m :: Type -> Type) a. MonadIO m => LogContext -> LogExec m a
- type LogContext = LogSource -> LogLevel -> Bool
- type LogExec (m :: Type -> Type) a = LoggingT m a -> m a
- type LogLevel = LogLevel
- initLogContext :: IO LogContext
- infoLevelFilter :: LogSource -> LogLevel -> Bool
- runDefaultLogExecWithContext :: LogExecWithContext
- runNullLogExec :: LogExecWithContext
- stdoutLoggingExec :: LogExecWithContext
- stdoutLoggingContext :: LogContext -> IO LogContext
- stderrLoggingExec :: LogExecWithContext
- stderrLoggingContext :: LogContext -> IO LogContext
- nullLogger :: Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- _log :: (MonadIO m, MonadLogger m) => Text -> LogLevel -> Text -> m ()
- logExceptions :: (MonadLogger m, MonadCatch m, MonadIO m) => Text -> m a -> m a
- levelInfo :: LogLevel
- levelError :: LogLevel
- levelDebug :: LogLevel
- minLevelFilter :: LogLevel -> LogSource -> LogLevel -> Bool
Documentation
type LogExecWithContext = forall (m :: Type -> Type) a. MonadIO m => LogContext -> LogExec m a Source #
Runs a monad-logger block with the filter predicate
type LogContext = LogSource -> LogLevel -> Bool Source #
A monad-logger filter predicate
initLogContext :: IO LogContext Source #
the default log environment
infoLevelFilter :: LogSource -> LogLevel -> Bool Source #
runDefaultLogExecWithContext :: LogExecWithContext Source #
Runs a monad-logger block with the filter predicate
runNullLogExec :: LogExecWithContext Source #
Disables monad-logger logging
stdoutLoggingExec :: LogExecWithContext Source #
Runs a monad-logger block targeting stdout, with the filter predicate
stdoutLoggingContext :: LogContext -> IO LogContext Source #
pure
stderrLoggingExec :: LogExecWithContext Source #
Runs a monad-logger block targeting stderr, with the filter predicate
stderrLoggingContext :: LogContext -> IO LogContext Source #
pure
nullLogger :: Loc -> LogSource -> LogLevel -> LogStr -> IO () Source #
monad-logger which does nothing
_log :: (MonadIO m, MonadLogger m) => Text -> LogLevel -> Text -> m () Source #
Log a message using the current time
logExceptions :: (MonadLogger m, MonadCatch m, MonadIO m) => Text -> m a -> m a Source #
re-throws exceptions after logging them
minLevelFilter :: LogLevel -> LogSource -> LogLevel -> Bool Source #