dbus-hslogger-0.1.1.0: Expose a dbus server to control hslogger
Safe HaskellNone
LanguageHaskell2010

System.Log.DBus.Server

Synopsis

Documentation

maybeToEither :: b -> Maybe a -> Either b a Source #

newtype LogServer Source #

An opaque handle for the log server, which tracks loggers whose levels have been explicitly set.

Constructors

LogServer (IORef (Map String Priority)) 

setLogLevelTracked :: LogServer -> String -> Priority -> IO () Source #

setLogLevelFromPriorityStringTracked :: LogServer -> String -> String -> IO (Either Reply ()) Source #

getLogLevel :: String -> IO String Source #

Get the log level of a specific logger. Returns the level as a string, or an empty string if no level has been explicitly set on that logger.

getConfiguredLogLevels :: LogServer -> IO (Map String String) Source #

Get all loggers whose levels have been explicitly set via SetLogLevel, as a map from logger name to level string.

logInterfaceWithServer :: LogServer -> Interface Source #

Build the D-Bus interface with tracking and introspection methods.

logInterface :: Interface Source #

The original interface with only SetLogLevel. Kept for backward compatibility.

logPath :: ObjectPath Source #

startLogServerWithTracking :: Client -> IO LogServer Source #

Start the log server with tracking and introspection. Returns a LogServer handle that can be used to register additional loggers.

startLogServer :: Client -> IO () Source #

Start the log server (original API, no tracking).

logIntrospectionInterface :: Interface Source #

Introspection interface including all methods (SetLogLevel, GetLogLevel, GetConfiguredLogLevels). Suitable for TH client generation.

setLogLevelFromPriorityString :: String -> String -> IO (Either Reply ()) Source #

setLogLevel :: String -> Priority -> IO () Source #