srv_log

Writes a message to the Open Data Services log file.


Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.


For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).

Syntax

int srv_log (
SRV_SERVER * server,
BOOL date_stamp,
DBCHAR * msg,
int msglen );

Arguments
server
Is a pointer to the SRV_SERVER structure being accessed by the Open Data Services server application.
date_stamp
Specifies prefixes on each log message to mark the current date and time if the log message is TRUE. If FALSE, log messages do not get a date and time stamp.
msg
Contains the actual text of the message. Note that the newline character is added to the end of msg.
msglen
Specifies the length, in bytes, of msg. If msglen is SRV_NULLTERM, the msg string is expected to be null-terminated and msglen is ignored.
Returns

SUCCEED or FAIL.

Remarks

The default name of the log file is Srv.log. The name of the log file can be set with srv_config and can be found with srv_sfield.

The log file can be changed at any time. If the log file is changed, the current log file, if any, is closed and a new log file is opened.

Messages are always added to a log file if one exists.

See Also
srv_config srv_sfield
srv_getserver  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.