Sun Java System Web Server 7.0 Update 8 NSAPI Developer's Guide

log_error() Function

The log_error function creates an entry in an error log, recording the date, the severity, and a description of the error.

Syntax

int log_error(int degree, char *func, Session *sn, Request *rq, char *fmt, ...);

Return Values

0 if the log entry is created, or -1 if the log entry is not created.

Parameters

int degree specifies the severity of the error. The parameter value must be one of the following constants:

char *func is the name of the function where the error has occurred.

Session *sn is the session.

Request *rq is the request.

char *fmt specifies the format for the printf function that delivers the message.

Example

log_error(LOG_WARN, "send-file", sn, rq, "error opening buffer from %s (%s)"),
           path, system_errmsg(fd));

See Also

func_exec() Function