Log4gLogManager

Log4gLogManager — Operate on the current logger repository

Synopsis

                    Log4gLogManager;
                    Log4gLogManagerClass;
void                log4g_log_manager_remove_instance   (void);
Log4gLoggerRepository * log4g_log_manager_get_logger_repository
                                                        (void);
Log4gLogger *       log4g_log_manager_get_root_logger   (void);
Log4gLogger *       log4g_log_manager_get_logger        (const gchar *name);
Log4gLogger *       log4g_log_manager_get_logger_factory
                                                        (const gchar *name,
                                                         Log4gLoggerFactory *factory);
Log4gLogger *       log4g_log_manager_exists            (const gchar *name);
const GArray *      log4g_log_manager_get_current_loggers
                                                        (void);
void                log4g_log_manager_shutdown          (void);
void                log4g_log_manager_reset_configuration
                                                        (void);
void                log4g_log_manager_set_repository_selector
                                                        (Log4gRepositorySelector *selector,
                                                         GObject *guard);

Description

Use the log manager class to retrieve logger instances or operate on the current logger repository.

Details

Log4gLogManager

typedef struct {
} Log4gLogManager;

The Log4gLogManager structure does not have any public members.


Log4gLogManagerClass

typedef struct {
} Log4gLogManagerClass;

The Log4gLogManagerClass structure does not have any public members.


log4g_log_manager_remove_instance ()

void                log4g_log_manager_remove_instance   (void);

Remove the current log manager instance.

Note

Do not call this function unless you really know what you are doing.

Since 0.1


log4g_log_manager_get_logger_repository ()

Log4gLoggerRepository * log4g_log_manager_get_logger_repository
                                                        (void);

Retrieve the current logger repository.

See: log4g/interface/logger-repository.h

Returns :

The current logger repository.

Since 0.1


log4g_log_manager_get_root_logger ()

Log4gLogger *       log4g_log_manager_get_root_logger   (void);

Retrieve the root logger.

Returns :

The root logger.

Since 0.1


log4g_log_manager_get_logger ()

Log4gLogger *       log4g_log_manager_get_logger        (const gchar *name);

Retrieve a named logger.

If the named logger does not exist it will be created.

name :

The name of the logger to retrieve.

Returns :

A logger instance.

Since 0.1


log4g_log_manager_get_logger_factory ()

Log4gLogger *       log4g_log_manager_get_logger_factory
                                                        (const gchar *name,
                                                         Log4gLoggerFactory *factory);

Retrieve a named logger.

If the named logger does not exist it will be created using the provided logger factory.

See: log4g/interface/logger-factory.h

name :

The name of the logger to retrieve.

factory :

The factory to use if name does not already exist.

Since 0.1


log4g_log_manager_exists ()

Log4gLogger *       log4g_log_manager_exists            (const gchar *name);

Retrieve a named logger if it already exists.

If name does not exist it will not be created.

name :

The name of the logger to retrieve.

Returns :

A logger named name or NULL if name does not exist.

Since 0.1


log4g_log_manager_get_current_loggers ()

const GArray *      log4g_log_manager_get_current_loggers
                                                        (void);

Retrieve an array containing all current existing loggers.

Note

It is the callers responsibility to call g_array_free() for the returned value.

Returns :

An array containing all current loggers.

Since 0.1


log4g_log_manager_shutdown ()

void                log4g_log_manager_shutdown          (void);

Shut down the current logger repository.

Since 0.1


log4g_log_manager_reset_configuration ()

void                log4g_log_manager_reset_configuration
                                                        (void);

Reset the configuration for the current logger repository.

Since 0.1


log4g_log_manager_set_repository_selector ()

void                log4g_log_manager_set_repository_selector
                                                        (Log4gRepositorySelector *selector,
                                                         GObject *guard);

Sets a new repository selector. If a guard object has been set then it must be supplied.

selector :

The new repository selector.

guard :

The previous guard object (if one was set).

Since 0.1

See Also

Log4gLogger, log4gLoggerRepository