Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Logging::BaseLog Class Reference

#include <loggingBaseLog.h>

Inheritance diagram for Logging::BaseLog:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Priority {
  LM_SHUTDOWN = 01, LM_TRACE = 02, 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

const std::string FIELD_UNAVAILABLE
const std::string GLOBAL_LOGGER_NAME
const std::string ANONYMOUS_LOGGER_NAME
const std::string STATIC_LOGGER_NAME

Detailed Description

Pure abstract logging interface. Includes the bare minimum logging concepts used by ALMA.


Member Enumeration Documentation

enum Logging::BaseLog::Priority
 

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.

Enumeration values:
LM_SHUTDOWN 
LM_TRACE  Messages indicating function-calling sequence.
LM_DEBUG  Messages that contain information normally of use only when debugging a program
LM_INFO  Informational messages.
LM_NOTICE  Conditions that are not error conditions, but that may require special handling
LM_WARNING  Warning messages.
LM_ERROR  Error messages.
LM_CRITICAL  Critical conditions, such as hard device errors.
LM_ALERT  A condition that should be corrected immediately, such as a corrupted system database
LM_EMERGENCY  A panic condition. This is normally broadcast to all users.


Constructor & Destructor Documentation

virtual Logging::BaseLog::~BaseLog  )  [inline, virtual]
 


Member Function Documentation

virtual std::string Logging::BaseLog::getName  )  const [pure virtual]
 

Retrieves the name of this instance. Exactly what that name is depends on the subclass.

Returns:
The name of this instance

Implemented in Logging::Logger, Logging::LogSvcHandler, and Logging::StdoutHandler.

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.)

Parameters:
lr log record
Returns:
void

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.

Parameters:
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.
Returns:
void

Reimplemented in Logging::Logger.


Member Data Documentation

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.

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.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:37:27 2009 for ACS C++ API by doxygen 1.3.8