Safe Haskell | None |
---|
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.
- data SyslogUsage
- = SyslogNo
- | SyslogYes
- | SyslogOnly
- syslogUsageFromRaw :: forall m. Monad m => String -> m 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.
Bounded SyslogUsage | |
Enum SyslogUsage | |
Eq SyslogUsage | |
Ord SyslogUsage | |
Show SyslogUsage |
syslogUsageFromRaw :: forall m. Monad m => String -> m SyslogUsageSource
syslogUsageToRaw :: SyslogUsage -> StringSource
logFormatter :: String -> Bool -> Bool -> LogFormatter aSource
openFormattedHandler :: LogHandler a => Bool -> LogFormatter a -> IO a -> IO [a]Source
:: 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
logWarning :: String -> IO ()Source
Log at warning level.
logCritical :: String -> IO ()Source
Log at critical level.
logEmergency :: String -> IO ()Source
Log at emergency level.