Debugging agent functions (entry points).

The LogDbg attribute indicates the debug severities enabled for the agent function or agent framework. Debug severities used by agent functions are in the range of DBG_1-DBG_21.

To enable debug logging, use the LogDbg attribute at the type-level.

To set debug severities for a particular resource-type:

     hatype -modify <resource-type> LogDbg -add <Debug-Severity>
     [<Debug-Severity> ...]

To remove debug severities for a particular resource-type:

     hatype -modify <resource-type> LogDbg -delete <Debug-Severity>
     [<Debug-Severity> ...]

To remove all debug severities:

     hatype -modify <resource-type> LogDbg -delete -keys

Note that you cannot set debug severities for an individual resource.

To debug a specific agent's entry point, see the documentation for that agent. So for bundled agents, see the Bundled Agent's Reference Guide.

For example, if you want to log debug messages for the FileOnOff resource type with severity levels DBG_3 and DBG_4, use the hatype commands:

    # hatype -modify FileOnOff LogDbg -add DBG_3 DBG_4
    # hatype -display FileOnOff -attribute LogDbg
    TYPE        ATTRIBUTE         VALUE
    FileOnOff   LogDbg            DBG_3 DBG_4

The debug messages from the FileOnOff agent with debug severities DBG_3 and DBG_4 get printed to the log files. Debug messages from C++ entry points get printed to the agent log file (UNIX: $VCS_LOG/log/<resource_type>_A.log) and from script entry points will get printed to the HAD log file. An example line from the agent log file:

    .
    .
    2003/06/06 11:02:35 VCS DBG_3 V-16-50-0
    FileOnOff:f1:monitor:This is a debug message
           FileOnOff.C:res_monitor[28]