#include "loggingMACROS.h"
#include <ace/Log_Record.h>
#include "loggingLogSvcHandler.h"
#include "loggingLoggingProxy.h"
#include "loggingACSLogger.h"
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 ACS_CHECK_LOGGER |
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 | ||||
) |
ACS_CHECK_LOGGER; \ LOG(Logging::ace2acsPriority(LM_DEBUG), routine, text);
The pre-defined macro for outputting debug log entries. It accepts a
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 | ||||
) |
{ \ 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.
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. |
Referenced by SamplingThreadFlush< ACS_SAMP_TL >::runLoop().
#define ACS_LOG | ( | flags, | ||
routine, | ||||
X | ||||
) |
{ \ 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
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 ACEs logging macros. |
Usage example: ACS_LOG(LM_SOURCE_INFO | LM_PRIORITY(7), "maci::ContainerImpl::init", (LM_INFO, "A sample log entry %d", i));
Referenced by maci::ComponentStorage< T, H >::Destroy(), TestContainerServices::getCDB(), ACSDaemonServiceImpl< T >::run(), and TestACSThread::runLoop().
#define ACS_LOG_TIME | ( | flags, | ||
tStamp, | ||||
routine, | ||||
_log | ||||
) |
{ \ 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
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 | ) |
{ \ 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.
Usage example: ACS_SHORT_LOG((LM_INFO, "A sample log entry %d", i));
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 | ||||
) |
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 | ||||
) |
{ \ 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 | ||||
) |
{ \ 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 | ) |
{ \ 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 | ) |
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 | ) |
ACS_CHECK_LOGGER; \ LOG(Logging::ace2acsPriority(LM_TRACE), routine, Logging::BaseLog::FIELD_UNAVAILABLE);
The pre-defined macro for outputting trace log entries.
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