LogDbg is a type-level attribute that specifies which debug messages originating from the agent for that type are to be logged.
By default, LogDbg is an empty list, meaning that no debug messages are logged for a resource type. Users can modify this attribute for a given resource type, to specify the debug severities that they want to enable, which would cause those debug messages to be printed to the log files.
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
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 and from script entry points will get printed to the engine 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
You can override the LogDbg attribute. For example, for a specific critical resource, this attribute's value can be set to obtain more debug messages for the resource by adding more debug severities than those already set for the resource's type. From the command line, this can be done using the hares
command. For example:
# hares -modify f1 LogDbg -add DBG_5
# hares -display f1 -attribute LogDbg
Resource Attribute System Value
f1 LogDbg global DBG_3 DBG_4 DBG_5
Note that once LogDbg is overridden, you have to use the 'hares' command to display the value of the LogDbg attribute for resource f1. The 'hatype' command will display the value for the entire type.
The FileOnOff agent log would now include debug messages for the f1
resource at severity level DBG_5 in addition to debug messages at the severity levels DBG_3 and DBG_4 enabled for the resource type.
The LogDbg attribute value can be overridden.
Note Values of LogDbg overridden for a resource are effective only if the agent uses VCSAG_RES_LOG_MSG, the only API that checks if a particular debug severity is enabled for the resource before writing the message to the log file. Refer to Logging agent messages for more information.