ganeti

Safe HaskellNone

Ganeti.Logging

Contents

Description

Implementation of the Ganeti logging functionality.

This currently lacks the following (FIXME):

  • log file reopening

Note that this requires the hslogger library version 1.1 and above.

Synopsis

Documentation

data SyslogUsage Source

Syslog usage type.

Constructors

SyslogNo 
SyslogYes 
SyslogOnly 

Instances

syslogUsageFromRaw :: forall m. Monad m => String -> m SyslogUsageSource

logFormatter :: String -> Bool -> Bool -> LogFormatter aSource

openFormattedHandler :: LogHandler a => Bool -> LogFormatter a -> IO a -> IO [a]Source

setupLoggingSource

Arguments

:: Maybe String

Log file

-> String

Program name

-> Bool

Debug level

-> Bool

Log to stderr

-> Bool

Log to console

-> SyslogUsage

Syslog usage

-> IO () 

Sets up the logging configuration.

Logging function aliases

class Monad m => MonadLog m whereSource

A monad that allows logging.

Methods

logAt :: Priority -> String -> m ()Source

Log at a given level.

Instances

MonadLog IO 
MonadLog m => MonadLog (ReaderT r m) 

logDebug :: MonadLog m => String -> m ()Source

Log at debug level.

logInfo :: MonadLog m => String -> m ()Source

Log at info level.

logNotice :: MonadLog m => String -> m ()Source

Log at notice level.

logWarning :: MonadLog m => String -> m ()Source

Log at warning level.

logError :: MonadLog m => String -> m ()Source

Log at error level.

logCritical :: MonadLog m => String -> m ()Source

Log at critical level.

logAlert :: MonadLog m => String -> m ()Source

Log at alert level.

logEmergency :: MonadLog m => String -> m ()Source

Log at emergency level.