C++

System loggings

This are normal ACS logging macros.

ACS_LOG(LM_FULL_INFO,"MyModule::MyClass::MyMethod",(LM_INFO,"My system log message"));

Custom loggings

#include <IRA>
CUSTOM_LOG(LM_FULL_INFO, "MyModule::MyClass::MyMethod", (LM_ALERT, "My user log message"));

System exceptions

_EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod");
dummy.log(LM_DEBUG); //
throw dummy; // if required

Custom exceptions

#include <IRA>
_EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod");
CUSTOM_EXCPT_LOG(dummy,LM_ERROR);
throw dummy; // if required

Interaction with operator input

This macro is for components development. The user message is encapsulated with the exception and presented to the user if the error is directly generated by a user command.

#include <ParserConnector.h>
_EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod");
_ADD_USER_MESSAGE(dummy,"My special message to the user"); // Show in the operator input if the error was triggered by an user command
throw dummy; // this will be logged by the caller

This macro is for stand alone programs that are issued as system calls by the command parser. The user message is handled like the other case and it’s also written into standard err and intercepted the the parser to be presented to the user.

#include <ParserConnector.h>
_EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod");
_ADD_USER_MESSAGE_DIRECT(dummy,"My special message to the user"); // Show in the operator input
throw dummy; // this will be logged by the caller