b9-1.0.1: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9.B9Logging

Description

This modules contains support for logging.

Since: 0.5.65

Synopsis

Documentation

newtype Logger Source #

The logger to write log messages to.

Since: 0.5.65

Constructors

MkLogger 

type CommandIO e = (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member LoggerReader e, Member B9ConfigReader e) Source #

Convenience type alias for Effects that have a B9Config, a Logger, MonadIO and MonadBaseControl.

Since: 0.5.65

type LoggerReader = Reader Logger Source #

Effect that reads a Logger.

Since: 0.5.65

withLogger :: (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member B9ConfigReader e) => Eff (LoggerReader ': e) a -> Eff e a Source #

Lookup the selected getLogVerbosity and _logFile from the B9Config and open it.

Then run the given action; if the action crashes, the log file will be closed.

Since: 0.5.65

traceL :: CommandIO e => String -> Eff e () Source #

dbgL :: CommandIO e => String -> Eff e () Source #

infoL :: CommandIO e => String -> Eff e () Source #

errorL :: CommandIO e => String -> Eff e () Source #