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

Safe Haskell | None
Language | Haskell2010

SwaggerPetstore.Logging

Contents

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

Description

Katip Logging functions

Synopsis

- type LogExecWithContext = forall m. MonadIO m => LogContext -> LogExec m
- type LogExec m = forall a. KatipT m a -> m a
- type LogContext = LogEnv
- type LogLevel = Severity
- initLogContext :: IO LogContext
- runDefaultLogExecWithContext :: LogExecWithContext
- stdoutLoggingExec :: LogExecWithContext
- stdoutLoggingContext :: LogContext -> IO LogContext
- stderrLoggingExec :: LogExecWithContext
- stderrLoggingContext :: LogContext -> IO LogContext
- runNullLogExec :: LogExecWithContext
- _log :: (Applicative m, Katip m) => Text -> LogLevel -> Text -> m ()
- logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a
- levelInfo :: LogLevel
- levelError :: LogLevel
- levelDebug :: LogLevel

# Type Aliases (for compatibility)

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

Runs a Katip logging block with the Log environment

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

A Katip logging block

type LogContext = LogEnv Source #

A Katip Log environment

type LogLevel = Severity Source #

A Katip Log severity

# default logger

initLogContext :: IO LogContext Source #

the default log environment

runDefaultLogExecWithContext :: LogExecWithContext Source #

Runs a Katip logging block with the Log environment

# stdout logger

stdoutLoggingExec :: LogExecWithContext Source #

Runs a Katip logging block with the Log environment

stdoutLoggingContext :: LogContext -> IO LogContext Source #

A Katip Log environment which targets stdout

# stderr logger

stderrLoggingExec :: LogExecWithContext Source #

Runs a Katip logging block with the Log environment

stderrLoggingContext :: LogContext -> IO LogContext Source #

A Katip Log environment which targets stderr

# Null logger

runNullLogExec :: LogExecWithContext Source #

Disables Katip logging

# Log Msg

_log :: (Applicative m, Katip m) => Text -> LogLevel -> Text -> m () Source #

Log a katip message

# Log Exceptions

logExceptions :: (Katip m, MonadCatch m, Applicative m) => Text -> m a -> m a Source #

re-throws exceptions after logging them

# Log Level

levelInfo :: LogLevel Source #

levelError :: LogLevel Source #

levelDebug :: LogLevel Source #