srv_log

Writes a message to the Open Data Services log file.

Syntax

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

where

server
Is a pointer to the SRV_SERVER server structure being accessed by the Open Data Services server application.
datestamp
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; the name of the log file 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

This entry For information about
srv_config Setting the server configuration parameters
SRV_GETSERVER Accessing a client's Open Data Services structure
srv_sfield Returning a field from an SRV_SERVER structure