Log Category
The log category for the agent is defined using the primitive VCSAgSetLogCategory (cat_ID) within the VCSAgStartup entry point.The log category is set to 2001 in the following example:
VCSEXPORT void VCSDECL VCSAgStartup()
{
VCSAG_LOG_INIT("VCSAgStartup");
VCSAgV40EntryPointStruct ep;
ep.open = NULL;
ep.close = NULL;
ep.monitor = file_monitor;
ep.online = file_online;
ep.offline = file_offline;
ep.clean = file_clean;
ep.attr_changed = NULL;
ep.shutdown = NULL;
ep.action = NULL;
ep.info = NULL;
VCSAgSetLogCategory(2001);
char *s = setlocale(LC_ALL, NULL);
VCSAG_LOGDBG_MSG(VCS_DBG1, VCS_DEFAULT_FLAGS, "Locale is
%s", s);
VCSAgRegisterEPStruct(V40, &ep);
}
The log category for debug messages is by default 50, and does not need to be set.
|