Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Agent Developer's Guide   

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.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Agent Developer's Guide  
VERITAS Software Corporation
www.veritas.com