The LogSystem function group provides you with the capability of controlling the diagnostic messages that are generated by DPCL. This includes:
Each DPCL communication daemon is capable of generating diagnostic messages that enable you or the IBM Support Center to identify problems that your analysis tool may encounter while interacting with the DPCL system. These messages can be turned on separately for each DPCL communication daemon that your analysis tool is interacting with. For more information on DPCL diagnostic message logging, see DPCL Programming Guide
Description
This enumeration type controls the destination of diagnostic logging messages produced by DPCL daemons. Logging messages can be sent to the client that has assumed control over logging for a specified daemon, to a file on the node where the daemon is running, to both places, or to neither place. When logging messages are not sent to either place, the DPCL client making the request assumes control over the logging, but no log messages are produced.
The following are members of the enumerated type of
LoggingDest. Refer to DPCL Programming Guide for a
full description of each status code.
Table 9. LoggingDest Enumeration Types
Enumeration Type | Description |
---|---|
LGD_both | Information logged by the daemon and sent to the client |
LGD_client | Information sent to the client only |
LGD_daemon | Information logged by the daemon only |
LGD_neither | Information is not gathered |
Description
This enumeration type controls the amount of diagnostic logging data that is produced by the diagnostic logging subsystem. Each level is inclusive, in that LGL_warning shows warning messages as well as severe and fatal messages, and LGL_trace shows trace messages, warning messages, severe messages, fatal messages, and so on.
The following are members of the enumerated type of LoggingLevel. Refer to DPCL Programming Guide for a full description of each status code.
Table 10. LoggingLevel Enumeration Types
Enumeration Type | Description |
---|---|
LGL_fatal | Next action is to crash |
LGL_severe | Something is seriously wrong |
LGL_warning | Warning |
LGL_trace | Function entry/exit |
LGL_detail | Other, more general, information |
Synopsis
#include <LogSystem.h> AisStatus Ais_blog_off(const char *hostname);
Parameters
Description
Sends a blocking request, to the daemon on the specified host, to turn off diagnostic logging. If the client that issues this request is not in control of diagnostic logging, the daemon will be unable to satisfy this request.
Return Values
See Also
Ais_blog_on, Ais_log_off
Synopsis
#include <LogSystem.h> AisStatus Ais_blog_on(const char *hostname); AisStatus Ais_blog_on( const char *hostname, LoggingLevel level, LoggingDest dest, GCBFuncType log_cb_fp, GCBTagType log_cb_tag);
Parameters
Description
Sends a blocking request, to the daemon on the specified host, to turn on debug logging. The first version of the function uses the LGL_severe and LGD_daemon default values for level and destination. If another DPCL client is already controlling logging for the daemon, this request will fail.
Return Values
Callback Data
If the destination in the Ais_blog_on call is LGD_client or LGD_both, then the logging callback function is invoked whenever the DPCL communication daemon on which diagnostic logging was turned on produces a logging message. The message is passed to the callback function through the GCBMsgType parameter, in the form of a null-terminated character string.
See Also
Ais_blog_off, Ais_log_on
Synopsis
#include <LogSystem.h> AisStatus Ais_log_off( const char *hostname, GCBFuncType ack_cb_fp, GCBTagType ack_cb_tag);
Parameters
Description
Sends a non-blocking request to the daemon on the specified host to turn off debug logging. If another DPCL client is already controlling logging for the daemon, the daemon will be unable to satisfy this request.
Callback Data
When no callback is provided for the acknowledgment callback (when a value of NULL is used as the value for the acknowledgment callback function), the operation is executed but no acknowledgment callback is called. When a function is provided for this argument, that function is called when the operation of turning logging off is complete.
See Also
Ais_blog_on, Ais_log_off
Synopsis
#include <LogSystem.h> AisStatus Ais_log_on( const char *hostname, GCBFuncType ack_cb_fp, GCBTagType ack_cb_tag); AisStatus Ais_log_on( const char *hostname, LoggingLevel level, LoggingDest dest, GCBFuncType log_cb_fp, GCBTagType log_cb_tag, GCBFuncType ack_cb_fp, GCBTagType ack_cb_tag);
Parameters
Description
Sends a non-blocking request, to the daemon on the specified host, to turn on debug logging. The first version of the function uses the LGL_severe and LGD_daemon default values for level and destination. If another DPCL client is already controlling logging for the daemon, the daemon will be unable to satisfy this request.
Return Values
Callback Data
When no callback is provided for the acknowledgment callback (when a value of NULL is used as the value for the acknowledgment callback function), the operation is executed but no acknowledgment callback is called. When a function is provided for the argument, that function is called when the operation of turning logging on is complete.
If the destination in the Ais_log_on call is LGD_client or LGD_both, then the logging callback function is invoked whenever the DPCL communication daemon on which diagnostic logging was turned on produces a logging message. This message is passed to the callback function through the GCBMsgType parameter, in the form of a null-terminated character string.
See Also
Ais_blog_on, Ais_log_off