VLSsetUserTraceFile
Syntax
LS_STATUS_CODE VLSsetUserTraceFile (
VLS_ERR_FILE msgFile,
char *filePath );
Argument | Description |
msgFile |
An IN parameter. Refers to the standard file where trace messages are stored as output. It is defined as data type VLS_ERR_FILE, with the following possible values: >VLS_NULL > VLS_STDERR > VLS_STDOUT |
filePath |
The path of the file, including the filename, where trace log is to be maintained. If msgFile is set to VLS_STDERR or VLS_STDOUT, this path will be ignored. |
Description
Sets the location of the trace file.
This function is used to configure a file that stores trace and error logs. After this file is configured, all the trace and error logs are stored in this file.
At least, value for one of the arguments is to be passed. In case, if value for only one of the argument is passed, the other should be passed as VLS_NULL. However, if values for both the arguments are passed, then preference is given to the msgFile parameter.
NOTE If both the arguments are passed as VLS_NULL, no file is set for trace and error handling. In this case, the default file, STDERR, is used for output. This is applicable as general feature. One registered, a file can be unregistered by calling VLSsetUserTraceFile with VLS_NULL as argument.
Returns
The status code LS_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
Error Code |
Description |
VLS_CALLING_ERROR |
The argument specified is not correct, that is, either the file specified in the filePath argument is not valid or the value for msgFile argument passed is not as specified in the argument description. |
VLS_RESOURCE_LOCK_FAILURE |
Failed to obtain the API resource lock. On receiving this error, retry calling this API function. |
For a complete list of the error codes, see Licensing Library Error and Result Codes.