LogManager
class to retreive Logger instances or to operate on the current LoggerRepository.
More...
Static Public Member Functions | |
static void | setRepositorySelector (spi::RepositorySelectorPtr selector, void *guard) |
Sets LoggerFactory but only if the correct guard is passed as parameter. | |
static spi::LoggerRepositoryPtr & | getLoggerRepository () |
static LoggerPtr | getRootLogger () |
Retrieve the appropriate root logger. | |
static LoggerPtr | getLogger (const std::string &name) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | getLogger (const std::string &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | exists (const std::string &name) |
Determines if logger name exists in the hierarchy. | |
static LoggerPtr | getLogger (const std::wstring &name) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | getLogger (const std::wstring &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | exists (const std::wstring &name) |
Determines if logger name exists in the hierarchy. | |
static LoggerPtr | getLogger (const std::basic_string< UniChar > &name) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | getLogger (const std::basic_string< UniChar > &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | exists (const std::basic_string< UniChar > &name) |
Determines if logger name exists in the hierarchy. | |
static LoggerPtr | getLogger (const CFStringRef &name) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | getLogger (const CFStringRef &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | exists (const CFStringRef &name) |
Determines if logger name exists in the hierarchy. | |
static LoggerPtr | getLoggerLS (const LogString &name) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | getLoggerLS (const LogString &name, const spi::LoggerFactoryPtr &factory) |
Retrieve the appropriate Logger instance. | |
static LoggerPtr | existsLS (const LogString &name) |
Determines if logger name exists 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 to their default. |
LogManager
class to retreive Logger instances or to operate on the current LoggerRepository.
When the LogManager
class is loaded into memory the default initialization procedure is inititated.
static LoggerPtr exists | ( | const CFStringRef & | name | ) | [static] |
Determines if logger name exists in the hierarchy.
name | logger name. |
Determines if logger name exists in the hierarchy.
name | logger name. |
static LoggerPtr exists | ( | const std::wstring & | name | ) | [static] |
Determines if logger name exists in the hierarchy.
name | logger name. |
static LoggerPtr exists | ( | const std::string & | name | ) | [static] |
Determines if logger name exists in the hierarchy.
name | logger name. |
Determines if logger name exists in the hierarchy.
name | logger name. |
static LoggerList getCurrentLoggers | ( | ) | [static] |
static LoggerPtr getLogger | ( | const CFStringRef & | name, | |
const spi::LoggerFactoryPtr & | factory | |||
) | [static] |
Retrieve the appropriate Logger instance.
name | logger name. | |
factory | logger factory. |
static LoggerPtr getLogger | ( | const CFStringRef & | name | ) | [static] |
static LoggerPtr getLogger | ( | const std::basic_string< UniChar > & | name, | |
const spi::LoggerFactoryPtr & | factory | |||
) | [static] |
Retrieve the appropriate Logger instance.
name | logger name. | |
factory | logger factory. |
static LoggerPtr getLogger | ( | const std::wstring & | name, | |
const spi::LoggerFactoryPtr & | factory | |||
) | [static] |
Retrieve the appropriate Logger instance.
name | logger name. | |
factory | logger factory. |
static LoggerPtr getLogger | ( | const std::wstring & | name | ) | [static] |
static LoggerPtr getLogger | ( | const std::string & | name, | |
const spi::LoggerFactoryPtr & | factory | |||
) | [static] |
Retrieve the appropriate Logger instance.
name | logger name in current encoding. | |
factory | logger factory. |
static LoggerPtr getLogger | ( | const std::string & | name | ) | [static] |
Retrieve the appropriate Logger instance.
name | logger name in current encoding. |
static LoggerPtr getLoggerLS | ( | const LogString & | name, | |
const spi::LoggerFactoryPtr & | factory | |||
) | [static] |
Retrieve the appropriate Logger instance.
name | logger name. | |
factory | logger factory. |
static spi::LoggerRepositoryPtr& getLoggerRepository | ( | ) | [static] |
static LoggerPtr getRootLogger | ( | ) | [static] |
Retrieve the appropriate root logger.
static void resetConfiguration | ( | ) | [static] |
Reset all values contained in this current LoggerRepository to their default.
static void setRepositorySelector | ( | spi::RepositorySelectorPtr | selector, | |
void * | guard | |||
) | [static] |
Sets LoggerFactory
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
.
static void shutdown | ( | ) | [static] |
Safely close and remove all appenders in all loggers including the root logger.