Sun Java System Web Server 6.1 SP9 NSAPI Programmer's Guide



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


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


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


int degree specifies the severity of the error. It must be one of the following constants:

LOG_WARN -- warning LOG_MISCONFIG -- a syntax error or permission violation LOG_SECURITY -- an authentication failure or 403 error from a hostLOG_FAILURE -- an internal problemLOG_CATASTROPHE -- a nonrecoverable server errorLOG_INFORM -- an informational message

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

Session *sn is the Session.

Request *rq is the Request.

The Session and Request parameters are the same as the ones passed into your SAF.

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

... represents a sequence of parameters for the printf function.


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

See Also