Defines

loggingACEMACROS.h File Reference

#include "loggingMACROS.h"
#include <ace/Log_Record.h>
#include "loggingLogSvcHandler.h"
#include "loggingLoggingProxy.h"
#include "loggingACSLogger.h"
Include dependency graph for loggingACEMACROS.h:
This graph shows which files directly or indirectly include this file:

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:

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.

Referenced by SamplingThreadFlush< ACS_SAMP_TL >::runLoop().

#define ACS_LOG (   flags,
  routine,
  X 
)
Value:
{ \
    ACS_CHECK_LOGGER; \
    LoggingProxy::Flags(flags); \
    Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \
    tStruct = Logging::LogSvcHandler::unformatted2formatted X; \
    LOG(tStruct.priority, routine, tStruct.message); \
}

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.

Referenced by maci::ComponentStorage< T, H >::Destroy(), TestContainerServices::getCDB(), ACSDaemonServiceImpl< T >::run(), and TestACSThread::runLoop().

#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 (   X  ) 
Value:

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.

Referenced by acsDaemonImpl< T >::acsDaemonImpl(), nc::SimpleConsumer< COUNTER::statusBlockEvent >::addSubscription(), BulkDataSendRecvImpl< TReceiverCallback, TSenderCallback >::closeReceiverStream(), BulkDataDistributerImpl< BulkDataDistributerStreamCb >::closeReceiverStream(), AcsBulkdata::BulkDataDistributerNotifCb< BulkDataDistributerStreamCb, BulkDataSenderDefaultCallback >::done(), baciTestCBpattern::done(), baciTestCBfloat::done(), baciTestCBdouble::done(), baciTestCBvoid::done(), BulkDataSendRecvImpl< TReceiverCallback, TSenderCallback >::fwdData2UserCB(), BulkDataDistributerImpl< BulkDataDistributerStreamCb >::fwdData2UserCB(), TestContainerServices::getCDB(), maci::SimpleClient::getComponent(), maci::ContainerImpl::getComponent(), ACSNotificationServiceImpHandlerImpl::getDetailedServiceState(), maci::ContainerImpl::getService(), ACSDaemonServiceImpl< T >::init_ORB(), BulkDataSendRecvImpl< TReceiverCallback, TSenderCallback >::openReceiverStream(), BulkDataDistributerImpl< BulkDataDistributerStreamCb >::openReceiverStream(), ArchiveConsumerCompImpl::receive(), acsDaemonImpl< T >::run(), ACSDaemonServiceImpl< T >::run(), ServiceDefinitionBuilderImpl::ServiceDefinitionBuilderImpl(), ACSImpBaseHandlerImpl< ACSInterfaceRepositoryImpHandlerImpl >::shutdown(), ACSDaemonServiceImpl< T >::shutdown(), ACSLogServiceImpHandlerImpl::start_acs_log(), ACSAlarmServiceImpHandlerImpl::start_alarm_service(), ACSInterfaceRepositoryImpHandlerImpl::start_interface_repository(), ACSLoggingServiceImpHandlerImpl::start_logging_service(), ACSManagerImpHandlerImpl::start_manager(), ACSNamingServiceImpHandlerImpl::start_naming_service(), ACSNotificationServiceImpHandlerImpl::start_notification_service(), ACSConfigurationDatabaseImpHandlerImpl::start_xml_cdb(), ACSDaemonServiceImpl< T >::startup(), ACSAlarmServiceImpHandlerImpl::stop_alarm_service(), ACSConfigurationDatabaseImpHandlerImpl::stop_cdb(), ACSInterfaceRepositoryImpHandlerImpl::stop_interface_repository(), ACSLoggingServiceImpHandlerImpl::stop_logging_service(), ACSManagerImpHandlerImpl::stop_manager(), ACSNamingServiceImpHandlerImpl::stop_naming_service(), ACSNotificationServiceImpHandlerImpl::stop_notification_service(), baciTestCBpattern::working(), baciTestCBfloat::working(), baciTestCBdouble::working(), baciTestCBvoid::working(), ACSImpBaseHandlerImpl< ACSInterfaceRepositoryImpHandlerImpl >::~ACSImpBaseHandlerImpl(), and ServiceDefinitionBuilderImpl::~ServiceDefinitionBuilderImpl().

#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,
  X 
)
Value:
{ \
    ACS_CHECK_LOGGER; \
    LoggingProxy::Flags(flags); \
    Logging::LogSvcHandler::DeprecatedLogInfo tStruct; \
    tStruct = Logging::LogSvcHandler::unformatted2formatted X; \
    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_SHORT_LOG (   X  ) 
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_TRACE (   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_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");

Referenced by nc::SimpleConsumer< COUNTER::statusBlockEvent >::addSubscription(), AcsBulkdata::BulkDataDistributerNotifCb< BulkDataDistributerStreamCb, BulkDataSenderDefaultCallback >::BulkDataDistributerNotifCb(), BulkDataSenderDefaultCallback::BulkDataSenderDefaultCallback(), BulkDataTestNotificationCb::BulkDataTestNotificationCb(), BulkDataTestNotificationCb::done(), FridgeThread::FridgeThread(), BulkDataSenderDefaultCallback::get_timeout(), BulkDataSendRecvImpl< TReceiverCallback, TSenderCallback >::getCbStatus(), maci::ContainerImpl::getService(), BulkDataSenderDefaultCallback::handle_destroy(), BulkDataSenderDefaultCallback::handle_end_stream(), BulkDataSenderDefaultCallback::handle_timeout(), baci::BACIMonitor::monitorStateChanged(), BulkDataTestNotificationCb::negotiate(), acsDaemonImpl< T >::run(), BulkDataSenderDefaultCallback::set_protocol_object(), TestACSThread::TestACSThread(), BulkDataTestNotificationCb::working(), AcsBulkdata::BulkDataDistributerNotifCb< BulkDataDistributerStreamCb, BulkDataSenderDefaultCallback >::~BulkDataDistributerNotifCb(), BulkDataTestNotificationCb::~BulkDataTestNotificationCb(), DoorThread::~DoorThread(), FridgeThread::~FridgeThread(), and TestACSThread::~TestACSThread().

#define LM_MAX_PRIORITY   0x0F

Maximum priority

#define LM_PRIORITY (   p  )     p

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