Tivoli Header

Tivoli Storage Manager Using the Application Program Interface

dsmLogEventEx

The dsmLogEventEx function call logs a user message to the server log file, to the local error log, or to both. This call must be performed while at InSession state inside a session. Do not perform it within a send, get, or query. See Figure 20.

The severity determines the TSM message number. To view messages that are logged on the server, use the query actlog command through the Administrative Client. Use the TSM client option, errorlogretention, to prune the client error log file if the application generates numerous client messages written to the client log (dsmLogType either logLocal or logBoth). Refer to the Tivoli Storage Manager Administrator's Reference for more information.

Syntax

extern dsInt16_t DSMLINKAGE  dsmLogEventEx(
       dsUint32_t            dsmHandle,
       dsmLogExIn_t          *dsmLogExInP,
       dsmLogExOut_t         *dsmLogExOutP
);

Parameters

dsUint32_t dsmHandle(I)
The handle that associates this call with a previous dsmInitEx call.

dsmLogExIn_t *dsmLogExInP
This structure contains the input parameters.

dsmLogSeverity severity;
This parameter is the event severity. The possible values are:
   logSevInfo,       /* information ANE4990 */
   logSevWarning,    /* warning     ANE4991 */
   logSevError,      /* Error       ANE4992 */
   logSevSevere      /* severe      ANE4993 */ 

char appMsgID[8];
This parameter is a string to identify the specific application message. The format we recommend is three characters that are followed by four numbers. For example DSM0250.

dsmLogType logType;
This parameter specifies where to direct the event. The possible values include: logServer, logLocal, or logBoth.

char *message;
This parameter is the text of the event message to log. This must be a null-ended string. The maximum length is DSM_MAX_RC_MSG_LENGTH.
Note:
Messages that go to the server should be in English. Non-English messages will not display correctly.

dsmLogExOut_t *dsmLogExOutP
This structure contains the output parameters.
Note:
Currently, there are no output parameters.

Return Codes

The return code numbers are provided in parentheses ( ).

Table 36. Return Codes for dsmLogEventEx

Return Code Explanation
DSM_RC_STRING_TOO_LONG (2120) The message string is too long.


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