haskell-google-genai-client
Safe HaskellNone
LanguageGHC2021

GenAI.Client.Logging

Description

Logging functions

Synopsis

Documentation

type LogLevel = LogLevel Source #

A monad-logger log level

type LogExecWithContext = forall (m :: Type -> Type) a. MonadIO m => LogContext -> LogExec m a Source #

Runs a monad-logger block with the filter predicate

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

Log a message using the current time

initLogContext :: IO LogContext Source #

the default log environment

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

re-throws exceptions after logging them

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

monad-logger which does nothing

runDefaultLogExecWithContext :: LogExecWithContext Source #

Runs a monad-logger block with the filter predicate

runNullLogExec :: LogExecWithContext Source #

Disables monad-logger logging

stderrLoggingExec :: LogExecWithContext Source #

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

stdoutLoggingExec :: LogExecWithContext Source #

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

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

A monad-logger filter predicate

type LogExec (m :: Type -> Type) a = LoggingT m a -> m a Source #

A monad-logger block