openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client

Safe Haskell | Safe
Language | Haskell2010

OpenAPIPetstore.Logging

Contents

- Type Aliases (for compatibility)
- default logger
- stdout logger
- stderr logger
- Null logger
- Log Msg
- Log Exceptions
- Log Level
- Level Filter

Description

Logging functions

Synopsis

- type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m
- type LogExec m = forall a. LoggingT m a -> m a
- type LogContext = LogSource -> LogLevel -> Bool
- type LogLevel = LogLevel
- initLogContext :: IO LogContext
- runDefaultLogExecWithContext :: LogExecWithContext
- stdoutLoggingExec :: LogExecWithContext
- stdoutLoggingContext :: LogContext -> IO LogContext
- stderrLoggingExec :: LogExecWithContext
- stderrLoggingContext :: LogContext -> IO LogContext
- runNullLogExec :: LogExecWithContext
- 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
- infoLevelFilter :: LogSource -> LogLevel -> Bool

# Type Aliases (for compatibility)

type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m Source #

Runs a monad-logger block with the filter predicate

type LogExec m = forall a. LoggingT m a -> m a Source #

A monad-logger block

type LogContext = LogSource -> LogLevel -> Bool Source #

A monad-logger filter predicate

type LogLevel = LogLevel Source #

A monad-logger log level

# default logger

initLogContext :: IO LogContext Source #

the default log environment

runDefaultLogExecWithContext :: LogExecWithContext Source #

Runs a monad-logger block with the filter predicate

# stdout logger

stdoutLoggingExec :: LogExecWithContext Source #

Runs a monad-logger block targeting stdout, with the filter predicate

stdoutLoggingContext :: LogContext -> IO LogContext Source #

    pure

# stderr logger

stderrLoggingExec :: LogExecWithContext Source #

Runs a monad-logger block targeting stderr, with the filter predicate

stderrLoggingContext :: LogContext -> IO LogContext Source #

    pure

# Null logger

runNullLogExec :: LogExecWithContext Source #

Disables monad-logger logging

nullLogger :: Loc -> LogSource -> LogLevel -> LogStr -> IO () Source #

monad-logger which does nothing

# Log Msg

_log :: (MonadIO m, MonadLogger m) => Text -> LogLevel -> Text -> m () Source #

Log a message using the current time

# Log Exceptions

logExceptions :: (MonadLogger m, MonadCatch m, MonadIO m) => Text -> m a -> m a Source #

re-throws exceptions after logging them

# Log Level

levelInfo :: LogLevel Source #

levelError :: LogLevel Source #

levelDebug :: LogLevel Source #

# Level Filter

minLevelFilter :: LogLevel -> LogSource -> LogLevel -> Bool Source #

infoLevelFilter :: LogSource -> LogLevel -> Bool Source #