rwsf::Logger rwsf::HandleBase
debug() dev() error() fatal() |
getName() info() init() log() |
Logger() LogLevel operator=() verbose() |
warn() wouldLog() ~Logger() |
#include <rwsf/core/Logger.h>
rwsf::Logger provides an interface for writing log messages to the logging framework. Log messages can be classified by log level.
This class implements the handle/body idiom in which rwsf::LoggerImp is the body.
enum LogLevel { LOG_NONE = 0, LOG_FATAL = 1, LOG_ERROR = 2, LOG_WARN = 3, LOG_INFO = 4, LOG_VERBOSE = 5, LOG_DEBUG = 6, LOG_DEV = 7 };
Enumeration for specifying log level.
Logger();
Default constructor.
Logger(const std::string& name, rwsf::LoggerImp* imp)
Constructs an rwsf::Logger instance with the given name and body.
Logger(const rwsf:::Logger& logger);
Copy constructor. Attaches to and increments the reference count on logger's body.
virtual ~Logger();
Destructor. Detaches from the current body (if any), decrements its reference count, and deletes it if there are no other references.
void debug(const std::string& message);
Logs the specified message at the debug level.
void debug(const rwsf::LogMessage& message);
Logs the specified message at the debug level.
void dev(const std::string& message);
Logs the specified message at the development debugging level.
void dev(const rwsf::LogMessage& message);
Logs the specified message at the development debugging level.
void error(const std::string& message);
Logs the specified message at the non-fatal error level.
void error(const rwsf::LogMessage& message);
Logs the specified message at the non-fatal error level.
void fatal(const std::string& message);
Logs the specified message at the fatal level.
void fatal(const rwsf::LogMessage& message);
Logs the specified message at the fatal level.
std::string getName() const;
Returns the name of this logger.
void info(const std::string& message);
Logs the specified message at the basic info level.
void info(const rwsf::LogMessage& message);
Logs the specified message at the basic info level.
void init(const rwsf::Config& config);
Initializes a default constructed rwsf::Logger instance based on the configuration information provided.
void log(Logger::LogLevel level, const std::string& message);
Logs the specified message at the given log level.
void log(Logger::LogLevel level, const rwsf::LogMessage& message);
Logs the specified message at the given level.
void verbose(const std::string& message);
Logs the specified message at the verbose level.
void verbose(const rwsf::LogMessage& message);
Logs the specified message at the verbose level.
void warn(const std::string& message);
Logs the specified message at the warning level.
void warn(const rwsf::LogMessage& message);
Logs the specified message at the warning level.
bool wouldLog(Logger::LogLevel level);
Returns true if the logger would log a message at the given log level.
Logger& operator=(const rwsf::Logger& logger);
Assignment operator.
©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.