You can use the macro VCSAG_LOG_MSG within C++ agent entry points to log all messages ranging in severity from CRITICAL to INFORMATION to the agent log file. Use the VCSAG_CONSOLE_LOG_MSG macro to send messages to the HAD log. Where the messages are of CRITICAL or ERROR severity, the message is also logged to the console.
The following table describes the argument fields for the application logging macros:
Severity of the message from the application. The values of | |
Default flags (0) prints UMI, NEWLINE. A macro, VCS_DEFAULT_FLAGS, represents the default value for the flags. | |
A formatted string containing formatting specifiers symbols. For example: "Resource could not be brought down because the attempt to remove the file (%s) failed with error (%d)" | |
Variable number (as many as 6) of type char, char *, or integer |
In the following example, the macros are used to log an error message to the agent log and to the console:
VCSAG_LOG_MSG(VCS_ERROR, 14002, VCS_DEFAULT_FLAGS,
"Resource could not be brought down because the
attempt to remove the file(%s) failed with error(%d)",
VCSAG_CONSOLE_LOG_MSG(VCS_ERROR, 14002, VCS_DEFAULT_FLAGS,
"Resource could not be brought down because, the