ganeti-htoolsSource codeContentsIndex
Ganeti.Logging
Contents
Logging function aliases
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
data SyslogUsage
= SyslogNo
| SyslogYes
| SyslogOnly
syslogUsageFromRaw :: forall m[a1Eyn]. Monad m[a1Eyn] => String -> m[a1Eyn] SyslogUsage
syslogUsageToRaw :: SyslogUsage -> String
logFormatter :: String -> Bool -> Bool -> LogFormatter a
openFormattedHandler :: LogHandler a => Bool -> LogFormatter a -> IO a -> IO [a]
setupLogging :: Maybe String -> String -> Bool -> Bool -> Bool -> SyslogUsage -> IO ()
logDebug :: String -> IO ()
logInfo :: String -> IO ()
logNotice :: String -> IO ()
logWarning :: String -> IO ()
logError :: String -> IO ()
logCritical :: String -> IO ()
logAlert :: String -> IO ()
logEmergency :: String -> IO ()
Documentation
data SyslogUsage Source
Syslog usage type.
Constructors
SyslogNo
SyslogYes
SyslogOnly
syslogUsageFromRaw :: forall m[a1Eyn]. Monad m[a1Eyn] => String -> m[a1Eyn] SyslogUsageSource
syslogUsageToRaw :: SyslogUsage -> StringSource
logFormatterSource
::
=> StringMultithreaded
-> BoolSyslog
-> Bool
-> LogFormatter a
Builds the log formatter.
openFormattedHandler :: LogHandler a => Bool -> LogFormatter a -> IO a -> IO [a]Source
Helper to open and set the formatter on a log if enabled by a given condition, otherwise returning an empty list.
setupLoggingSource
:: Maybe StringLog file
-> StringProgram name
-> BoolDebug level
-> BoolLog to stderr
-> BoolLog to console
-> SyslogUsageSyslog usage
-> IO ()
Sets up the logging configuration.
Logging function aliases
logDebug :: String -> IO ()Source
Log at debug level.
logInfo :: String -> IO ()Source
Log at info level.
logNotice :: String -> IO ()Source
Log at notice level.
logWarning :: String -> IO ()Source
Log at warning level.
logError :: String -> IO ()Source
Log at error level.
logCritical :: String -> IO ()Source
Log at critical level.
logAlert :: String -> IO ()Source
Log at alert level.
logEmergency :: String -> IO ()Source
Log at emergency level.
Produced by Haddock version 2.6.0