This guide describes the logging macros for C++ agents and script-based agents.
See Logging agent messages for more information.
For the purpose of comparison, the examples that follow show a pair of messages in C++ that are formatted using the pre-VCS 4.0 API and the VCS 4.0 macros.
Pre-VCS 4.0 APIs:
sprintf(msg, "VCS:140003:FileOnOff:%s:online:The value for PathName attribute is not specified", res_name); VCSAgLogI18NMsg(TAG_C, msg, 140003, res_name, NULL, NULL, NULL, LOG_DEFAULT); VCSAgLogI18NConsoleMsg(TAG_C, msg, 140003, res_name, NULL,NULL,NULL,LOG_DEFAULT);
VCS 4.0 macros:
VCSAG_LOG_MSG(VCS_WARNING, 14003, VCS_DEFAULT_FLAGS, "The value for PathName attribute is not specified"); VCSAG_CONSOLE_LOG_MSG(VCS_WARNING, 14003, VCS_DEFAULT_FLAGS, "The value for PathName attribute is not specified");