Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Test.Sandwich.Logging
Contents
Description
Logging functions.
Synopsis
- debug :: (HasCallStack, MonadLogger m) => Text -> m ()
- info :: (HasCallStack, MonadLogger m) => Text -> m ()
- warn :: (HasCallStack, MonadLogger m) => Text -> m ()
- logError :: (HasCallStack, MonadLogger m) => Text -> m ()
- logOther :: (HasCallStack, MonadLogger m) => LogLevel -> Text -> m ()
- createProcessWithLogging :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => CreateProcess -> m ProcessHandle
- readCreateProcessWithLogging :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => CreateProcess -> String -> m String
- createProcessWithLoggingAndStdin :: (HasCallStack, MonadUnliftIO m, MonadFail m, MonadLogger m) => CreateProcess -> String -> m ProcessHandle
- callCommandWithLogging :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => String -> m ()
- createProcessWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> CreateProcess -> m ProcessHandle
- readCreateProcessWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> CreateProcess -> String -> m String
- createProcessWithLoggingAndStdin' :: (HasCallStack, MonadUnliftIO m, MonadFail m, MonadLogger m) => LogLevel -> CreateProcess -> String -> m ProcessHandle
- callCommandWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> String -> m ()
Documentation
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
.
Process functions with logging
createProcessWithLogging :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => 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.
readCreateProcessWithLogging :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => CreateProcess -> String -> m String Source #
Like readCreateProcess
, but capture the stderr output in the logs.
Every line output by the process will be fed to a debug
call.
createProcessWithLoggingAndStdin :: (HasCallStack, MonadUnliftIO m, MonadFail m, MonadLogger m) => CreateProcess -> String -> m ProcessHandle Source #
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 :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => String -> m () Source #
Higher level version of createProcessWithLogging
, accepting a shell command.
createProcessWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> CreateProcess -> m ProcessHandle Source #
Spawn a process with its stdout and stderr connected to the logging system.
readCreateProcessWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> CreateProcess -> String -> m String Source #
Like readCreateProcess
, but capture the stderr output in the logs.
createProcessWithLoggingAndStdin' :: (HasCallStack, MonadUnliftIO m, MonadFail m, MonadLogger m) => LogLevel -> CreateProcess -> String -> m ProcessHandle Source #
Spawn a process with its stdout and stderr connected to the logging system.
callCommandWithLogging' :: (HasCallStack, MonadUnliftIO m, MonadLogger m) => LogLevel -> String -> m () Source #
Higher level version of createProcessWithLogging'
, accepting a shell command.