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

loggingACEMACROS.h File Reference

#include <ace/Log_Record.h>
#include "loggingMACROS.h"
#include "loggingLogSvcHandler.h"
#include "loggingLoggingProxy.h"
#include "loggingACSLogger.h"

Include dependency graph for loggingACEMACROS.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define ACS_CHECK_LOGGER
#define ACS_DEBUG(routine, text)
#define ACS_STATIC_DEBUG(routine, text)
#define ACS_DEBUG_PARAM(routine, text, param)
#define ACS_STATIC_DEBUG_PARAM(routine, text, param)
#define ACS_TRACE(routine)
#define ACS_STATIC_TRACE(routine)
#define ACS_SHORT_LOG(X)
#define ACS_STATIC_SHORT_LOG(X)
#define ACS_LOG(flags, routine, X)
#define ACS_STATIC_LOG(flags, routine, X)
#define ACS_LOG_TIME(flags, tStamp, routine, _log)
#define LM_PRIORITY(p)   p
#define LM_MAX_PRIORITY   0x0F


Define Documentation

#define ACS_CHECK_LOGGER
 

Value:

if (Logging::Logger::getGlobalLogger() == 0) \ { \ Logging::Logger::LoggerSmartPtr loggersp(new Logging::ACSLogger(Logging::BaseLog::GLOBAL_LOGGER_NAME)); \ Logging::Logger::setGlobalLogger(loggersp); \ }
Helper macro which check to see if a global logger has been set. If not, it sets it to be a new ACSLogger.

#define ACS_DEBUG routine,
text   ) 
 

Value:

ACS_CHECK_LOGGER; \ LOG(Logging::ace2acsPriority(LM_DEBUG), routine, text);
The pre-defined macro for outputting debug log entries. It accepts a
Parameters:
routine The fully qualified name of the routine where the log-entry is being generated.
text String containing debugging info
Usage example: ACS_DEBUG("maci::ContainerImpl::init", "Activator narrowed");

#define ACS_DEBUG_PARAM routine,
text,
param   ) 
 

Value:

{ \ ACS_CHECK_LOGGER; \ Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \ tStruct = Logging::LogSvcHandler::unformatted2formatted(LM_DEBUG, \ text, \ param); \ LOG(tStruct.priority, routine, tStruct.message); \ }
Identical to ACS_DEBUG except that this macro allows the developer to pass one printf-style parameter.
Parameters:
routine The fully qualified name of the routine where the log-entry is being generated.
text String containing debugging info
param A parameter to be placed into text using printf-style formatting.
Warning:
The formatted string created by combining param with text must not exceeed 1000 characters. If it does, you must use format the message on your own and pass it to the ACS_DEBUG macro.

#define ACS_LOG flags,
routine,
 ) 
 

Value:

The pre-defined macro for outputting log entries. It accepts three parameters

Parameters:
flags This parameter specifies the priority and additional log-entry flags, such as whether to output the runtime context (thread & process) or not.
routine The fully qualified name of the routine where the log-entry is being generated. Can be 0, in which case the routine name is not output.
log Formatted as (log_type, format_string, . . .). Passed as a parameter to ACE’s logging macros.
Usage example: ACS_LOG(LM_SOURCE_INFO | LM_PRIORITY(7), "maci::ContainerImpl::init", (LM_INFO, "A sample log entry %d", i));

Warning:
The formatted string printf-style string passed into this macro must not exceeed 1000 characters. If it does, you must use format the message on your own and pass it to the LOG macro.

#define ACS_LOG_TIME flags,
tStamp,
routine,
_log   ) 
 

Value:

{ \ ACS_CHECK_LOGGER; \ LoggingProxy::Flags(flags); \ Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \ tStruct = Logging::LogSvcHandler::unformatted2formatted _log; \ LOG_RECORD(tStruct.priority, tStruct.message, __FILE__, __LINE__, routine, tStamp, getLogger()->getName()); \ }
The pre-defined macro for outputting log entries with specified time. It accepts four parameters

  • flags: This parameter specifies the priority and additional log-entry flags, such as whether to output the runtime context (thread & process) or not.
  • timeStamp: time stamp in 100th of nanoseconds
  • routine: The fully qualified name of the routine where the log-entry is being generated. Can be 0, in which case the routine name is not output.
  • _log: logging message (not formated!!!)

Usage example:

ACS_LOG_TIME(LM_SOURCE_INFO | LM_PRIORITY(7), 234243, "maci::ContainerImpl::init", (LM_INFO, "A sample log entry "));

#define ACS_SHORT_LOG  ) 
 

Value:

{ \ ACS_CHECK_LOGGER; \ LoggingProxy::Flags(LM_FULL_INFO); \ Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \ tStruct = Logging::LogSvcHandler::unformatted2formatted X; \ LOG(tStruct.priority, Logging::BaseLog::FIELD_UNAVAILABLE, tStruct.message); \ }
The pre-defined macro for outputting log entries.

  • log: Formatted as (log_type, format_string, . . .). Passed as a parameter to ACE’s logging macros.

Usage example: ACS_SHORT_LOG((LM_INFO, "A sample log entry %d", i));

Warning:
The formatted string printf-style string passed into this macro must not exceeed 1000 characters. If it does, you must use format the message on your own and pass it to the LOG macro.

#define ACS_STATIC_DEBUG routine,
text   ) 
 

Value:

ACS_CHECK_LOGGER; \ STATIC_LOG(Logging::ace2acsPriority(LM_DEBUG), routine, text);
This macro is identical to the similarly named macro in almost every respect except that it is designed to be used from a static context.

#define ACS_STATIC_DEBUG_PARAM routine,
text,
param   ) 
 

Value:

{ \ ACS_CHECK_LOGGER; \ Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \ tStruct = Logging::LogSvcHandler::unformatted2formatted(LM_DEBUG, \ text, \ param); \ STATIC_LOG(tStruct.priority, routine, tStruct.message); \ }
This macro is identical to the similarly named macro in almost every respect except that it is designed to be used from a static context.

#define ACS_STATIC_LOG flags,
routine,
 ) 
 

Value:

This macro is identical to the similarly named macro in almost every respect except that it is designed to be used from a static context.

#define ACS_STATIC_SHORT_LOG  ) 
 

Value:

{ \ ACS_CHECK_LOGGER; \ LoggingProxy::Flags(LM_FULL_INFO); \ Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \ tStruct = Logging::LogSvcHandler::unformatted2formatted X; \ STATIC_LOG(tStruct.priority, Logging::BaseLog::FIELD_UNAVAILABLE, tStruct.message); \ }
This macro is identical to the similarly named macro in almost every respect except that it is designed to be used from a static context.

#define ACS_STATIC_TRACE routine   ) 
 

Value:

ACS_CHECK_LOGGER; \ STATIC_LOG(Logging::ace2acsPriority(LM_TRACE), routine, Logging::BaseLog::FIELD_UNAVAILABLE);
This macro is identical to the similarly named macro in almost every respect except that it is designed to be used from a static context.

#define ACS_TRACE routine   ) 
 

Value:

ACS_CHECK_LOGGER; \ LOG(Logging::ace2acsPriority(LM_TRACE), routine, Logging::BaseLog::FIELD_UNAVAILABLE);
The pre-defined macro for outputting trace log entries.
Parameters:
routine The fully qualified name of the routine where the log-entry is being generated.
Usage example: ACS_TRACE("maci::ContainerImpl::init");

#define LM_MAX_PRIORITY   0x0F
 

Maximum priority

#define LM_PRIORITY  )     p
 

Manipulate priority contained in the log entry’s flags. The priority can be from 0 ("use default") through 1 (lowest) to 31 (highest).


Generated on Thu Apr 30 02:34:55 2009 for ACS C++ API by doxygen 1.3.8