sandwich-0.1.0.9: Yet another test framework for Haskell
Safe HaskellNone
LanguageHaskell2010

Test.Sandwich.Logging

Description

Logging functions.

Synopsis

Basic logging functions

debug :: (HasCallStack, MonadLogger m) => Text -> m () Source #

Log a message at level LevelDebug.

info :: (HasCallStack, MonadLogger m) => Text -> m () Source #

Log a message at level LevelInfo.

warn :: (HasCallStack, MonadLogger m) => Text -> m () Source #

Log a message at level LevelWarn.

logError :: (HasCallStack, MonadLogger m) => Text -> m () Source #

Log a message at level LevelError.

logOther :: (HasCallStack, MonadLogger m) => LogLevel -> Text -> m () Source #

Log with a custom LogLevel.

System.Process helpers

createProcessWithLogging :: (MonadIO m, MonadBaseControl IO m, MonadLogger m, HasCallStack) => CreateProcess -> m ProcessHandle Source #

Functions for launching processes while capturing their output in the logs.

Spawn a process with its stdout and stderr connected to the logging system. Every line output by the process will be fed to a debug call.

callCommandWithLogging :: (MonadIO m, MonadBaseControl IO m, MonadLogger m) => String -> m () Source #

Higher level version of createProcessWithLogging, accepting a shell command.