addLogger() destroy() getLogger() |
init() load() LogManager() |
removeLogger() setDefault() ~LogManager() |
#include <rwsf/core/LogManager.h>
rwsf::LogManager is a singleton providing a central point for accessing logger instances. Loggers can be registered with the rwsf::LogManager class, and can then be accessed from anywhere in the code.
LogManager();
Default constructor. Creates a guard instance of rwsf::LogManager. This class will invoke init in the constructor, and destroy in the destructor, allowing for exception-safe handling of the global rwsf::LogManager instance.
~LogManager();
Destructor.
static bool addLogger(const Logger& logger);
Add a new logger to the manager. Returns true if the name is not currently in use; false otherwise.
static void destroy();
Destroys the manager. If the manager has been initialized more than once, an equivalent number of destroys will need to be invoked before the manager is actually destroyed.
static Logger getLogger();
Return the default logger associated with the manager. If thedefault logger cannot be found, a logger to stderr will be returned.
static Logger getLogger(const std::stringstd::string& name);
Return a named logger from the manager.
static void init();
Initializes the manager. For each call to init, there must be an associated call to destroy in order to eventually release the manager.
static void load(const std::string& file);
Load logger instances from a logger configuration file.
static void removeLogger(const std::string& name);
Remove a logger from the manager.
static void setDefault(const std::string& name);
Sets the name of the default logger.
©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.