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 ()
- class Monad m => MonadLog m where
- logAt :: Priority -> String -> m ()
- logDebug :: MonadLog m => String -> m ()
- logInfo :: MonadLog m => String -> m ()
- logNotice :: MonadLog m => String -> m ()
- logWarning :: MonadLog m => String -> m ()
- logError :: MonadLog m => String -> m ()
- logCritical :: MonadLog m => String -> m ()
- logAlert :: MonadLog m => String -> m ()
- logEmergency :: MonadLog m => String -> m ()
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 :: MonadLog m => String -> m ()Source
Log at warning level.
logCritical :: MonadLog m => String -> m ()Source
Log at critical level.
logEmergency :: MonadLog m => String -> m ()Source
Log at emergency level.