Apache Log4cxx
Version 1.2.0
|
Use the LogManager
class to retreive Logger instances or to operate on the current LoggerRepository
.
More...
#include <logmanager.h>
Static Public Member Functions | |
static void | setRepositorySelector (spi::RepositorySelectorPtr selector, void *guard) |
Use selector to source the LoggerRepository , but only if the correct guard is passed as parameter. | |
static spi::LoggerRepositoryPtr | getLoggerRepository () |
static LoggerPtr | getRootLogger () |
Retrieve the root logger from the LoggerRepository . | |
static LoggerPtr | getLogger (const std::string &name) |
Retrieve the name Logger instance from the LoggerRepository using DefaultLoggerFactory to create it if required. | |
static LoggerPtr | getLogger (const std::string &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the name Logger instance from the LoggerRepository using factory to create it if required. | |
static LoggerPtr | exists (const std::string &name) |
Does the logger name exist in the hierarchy? | |
static LoggerPtr | getLogger (const std::wstring &name) |
Retrieve the name Logger instance from the LoggerRepository using DefaultLoggerFactory to create it if required. | |
static LoggerPtr | getLogger (const std::wstring &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the name Logger instance from the LoggerRepository using factory to create it if required. | |
static LoggerPtr | exists (const std::wstring &name) |
Does the logger name exist in the hierarchy? | |
static LoggerPtr | getLogger (const std::basic_string< UniChar > &name) |
Retrieve the name Logger instance from the LoggerRepository using DefaultLoggerFactory to create it if required. | |
static LoggerPtr | getLogger (const std::basic_string< UniChar > &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the name Logger instance from the LoggerRepository using factory to create it if required. | |
static LoggerPtr | exists (const std::basic_string< UniChar > &name) |
Does the logger name exist in the hierarchy? | |
static LoggerPtr | getLogger (const CFStringRef &name) |
Retrieve the name Logger instance from the LoggerRepository using DefaultLoggerFactory to create it if required. | |
static LoggerPtr | getLogger (const CFStringRef &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the name Logger instance from the LoggerRepository using factory to create it if required. | |
static LoggerPtr | exists (const CFStringRef &name) |
Does the logger name exist in the hierarchy? | |
static LoggerPtr | getLoggerLS (const LogString &name) |
Retrieve the name Logger instance from the LoggerRepository using DefaultLoggerFactory to create it if required. | |
static LoggerPtr | getLoggerLS (const LogString &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the name Logger instance from the LoggerRepository using factory to create it if required. | |
static LoggerPtr | existsLS (const LogString &name) |
Does the logger name exist in the hierarchy? | |
static LoggerList | getCurrentLoggers () |
static void | shutdown () |
Safely close and remove all appenders in all loggers including the root logger. | |
static void | resetConfiguration () |
Reset all values contained in this current LoggerRepository 61 to their default. | |
static bool | removeLogger (const LogString &name, bool ifNotUsed=true) |
Remove the name Logger from the hierarchy. | |
Use the LogManager
class to retreive Logger instances or to operate on the current LoggerRepository
.
DefaultConfigurator::configure will be used to configure LoggerRepository when the first logger is retrieved if it is not already configured.
|
static |
Does the logger name
exist in the hierarchy?
Does the logger name
exist in the hierarchy?
Does the logger name
exist in the hierarchy?
Does the logger name
exist in the hierarchy?
Does the logger name
exist in the hierarchy?
|
static |
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using DefaultLoggerFactory to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using factory
to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
Retrieve the name
Logger instance from the LoggerRepository
using DefaultLoggerFactory to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using factory
to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
Retrieve the name
Logger instance from the LoggerRepository
using DefaultLoggerFactory to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using factory
to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
Retrieve the name
Logger instance from the LoggerRepository
using DefaultLoggerFactory to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using factory
to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
Retrieve the name
Logger instance from the LoggerRepository
using DefaultLoggerFactory to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the name
Logger instance from the LoggerRepository
using factory
to create it if required.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Retrieve the root logger from the LoggerRepository
.
Calls ensureIsConfigured
passing DefaultConfigurator::configure
to ensure the repository is configured.
|
static |
Remove the name
Logger from the hierarchy.
Note: The name
Logger must be retrieved from the hierarchy after any subsequent configuration file change for the newly loaded settings to be used.
name | The logger to remove. |
ifNotUsed | If true and use_count() indicates there are other references, do not remove the Logger and return false. |
name
Logger was removed from the hierarchy. Reset all values contained in this current LoggerRepository
61 to their default.
|
static |
Use selector
to source the LoggerRepository
, but only if the correct guard
is passed as parameter.
Initally the guard is null. If the guard is null
, then invoking this method sets the logger factory and the guard. Following invocations will throw a IllegalArgumentException
, unless the previously set guard
is passed as the second parameter.
This allows a high-level component to set the RepositorySelector
used by the LogManager.
Safely close and remove all appenders in all loggers including the root logger.