.. _C++APIs: *** C++ *** System loggings =============== This are normal ACS logging macros. .. code-block:: discos ACS_LOG(LM_FULL_INFO,"MyModule::MyClass::MyMethod",(LM_INFO,"My system log message")); Custom loggings =============== .. code-block:: discos #include CUSTOM_LOG(LM_FULL_INFO, "MyModule::MyClass::MyMethod", (LM_ALERT, "My user log message")); System exceptions ================= .. code-block:: discos _EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod"); dummy.log(LM_DEBUG); // throw dummy; // if required Custom exceptions ================= .. code-block:: discos #include _EXCPT(ErrorsNamespace::MyErrroEventExImpl,dummy,"MyModule::MyClass::MyMethod"); CUSTOM_EXCPT_LOG(dummy,LM_ERROR); throw dummy; // if required Interaction with operator input =============================== .. highlights:: 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. .. code-block:: discos #include _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 .. highlights:: 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. .. code-block:: discos #include _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