Dynamic Probe Class Library

DPCL Class Reference


Chapter 8. Function group LogSystem

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


Supporting data types

LoggingDest

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

LoggingLevel

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

Ais_blog_off

Synopsis

#include <LogSystem.h>
AisStatus Ais_blog_off(const char *hostname);

Parameters

hostname
name of the host where the daemon is running

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

ASC_success
the request was sent successfully

ASC_operation_failed
the client was unable to send the non-blocking request to the daemon

See Also

Ais_blog_on, Ais_log_off

Ais_blog_on

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

hostname
the name of the host where the daemon is running

level
the types of debug logging messages that are produced

dest
the destination for the debug logging messages

log_cb_fp
the callback function for debug logging message, if dest is either LGD_client or LGD_both

log_cb_tag
the tag passed to the log callback function

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

ASC_success
the request was successful

ASC_operation_failed
the daemon was unable to satisfy the request

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

Ais_log_off

Synopsis

#include <LogSystem.h>
AisStatus Ais_log_off(
    const char *hostname,
    GCBFuncType ack_cb_fp,
    GCBTagType ack_cb_tag);

Parameters

hostname
the name of the host where the daemon is running

ack_cb_fp
the callback that is called with the results of this non-blocking call. Specify the function name or NULL.

ack_cb_tag
the tag passed to the function ack_cb_fp

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

Ais_log_on

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

hostname
the name of the host where the daemon is running

level
the types of debug logging messages that are produced

dest
the destination for the debug logging messages

log_cb_fp
the callback function for the debug logging message, if dest is either LGD_client or LGD_both

log_cb_tag
the tag passed to the log callback function

ack_cb_fp
the callback that is called with the results of this non-blocking call. Specify the function name or NULL.

ack_cb_tag
the tag passed to the function ack_cb_fp

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

ASC_success
the request was sent successfully

ASC_operation_failed
the client was unable to send the non_blocking request to the daemon

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


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]