#include <loggingBaseLog.h>
Classes | |
struct | LogRecord |
Public Types | |
enum | Priority { LM_SHUTDOWN = 01, LM_TRACE = 02, LM_DELOUSE = 03, LM_DEBUG = 04, LM_INFO = 010, LM_NOTICE = 020, LM_WARNING = 040, LM_ERROR = 0200, LM_CRITICAL = 0400, LM_ALERT = 01000, LM_EMERGENCY = 02000 } |
Public Member Functions | |
virtual | ~BaseLog () |
virtual void | log (Priority priority, const std::string &message, const std::string &file, unsigned long line, const std::string &method) |
virtual void | log (const LogRecord &lr)=0 |
virtual std::string | getName () const =0 |
Static Public Attributes | |
static const std::string | FIELD_UNAVAILABLE |
static const std::string | GLOBAL_LOGGER_NAME |
static const std::string | ANONYMOUS_LOGGER_NAME |
static const std::string | STATIC_LOGGER_NAME |
Pure abstract logging interface. Includes the bare minimum logging concepts used by ALMA.
This enumeration is intended to be the various logging levels for ALMA software starting with the lowest priority up to the highest. It is based on ACE logging levels.
virtual Logging::BaseLog::~BaseLog | ( | ) | [inline, virtual] |
virtual std::string Logging::BaseLog::getName | ( | ) | const [pure virtual] |
Retrieves the name of this instance. Exactly what that name is depends on the subclass.
Implemented in Logging::Logger, Logging::LogSvcHandler, and Logging::StdoutHandler.
virtual void Logging::BaseLog::log | ( | Priority | priority, | |
const std::string & | message, | |||
const std::string & | file, | |||
unsigned long | line, | |||
const std::string & | method | |||
) | [virtual] |
This method just delegates to another signature of log adding the timestamp in the process.
priority | Priority of the log | |
message | Log message. | |
file | Name of the file from which the log came from. | |
line | Line number from where the log was published. | |
method | Name of the method from where the log was published. |
Reimplemented in Logging::Logger.
virtual void Logging::BaseLog::log | ( | const LogRecord & | lr | ) | [pure virtual] |
It it completely up to the subclass developer to decide exactly what this method does (e.g., writes the log to file, sends it over the network, etc.)
lr | log record |
Implemented in Logging::Logger, Logging::LogSvcHandler, and Logging::StdoutHandler.
const std::string Logging::BaseLog::ANONYMOUS_LOGGER_NAME [static] |
This constant member is the value of the anonymous logger's name.
const std::string Logging::BaseLog::FIELD_UNAVAILABLE [static] |
This constant member is the value of a string param of log that cannot be determined for some reason or another.
Referenced by Logging::Logger::log().
const std::string Logging::BaseLog::GLOBAL_LOGGER_NAME [static] |
This constant member is the value of the global logger's name.
const std::string Logging::BaseLog::STATIC_LOGGER_NAME [static] |
This constant member is the name of loggers being used from a static context.