slapi_log_error()

Writes a message to the error log for the directory server.

Syntax
#include "slapi-plugin.h"
int slapi_log_error( int severity, char *subsystem, char *fmt, ... );
Parameters
severity
Level of severity of the message. In combination with the severity level specified by ibm-slapdSysLogLevel in the ibmslapd.conf file, determines whether the message is written to the log. The severity must be one of the following values :
  • LDAP_MSG_LOW
  • LDAP_MSG_MED
  • LDAP_MSG_HIGH
The following entry in the ibmslapd.conf file results in a medium logging level:
#ibm-slapdSysLogLevel must be one of l/m/h (l=terse, h=verbose)
ibm-slapdSysLogLevel: m
With this example in your ibmslapd.conf file, log messages with severity LDAP_MSG_HIGH or LDAP_MSG_MED are logged. The messages with severity LDAP_MSG_LOW are not logged. If the slapdSysLogLevel is set to h, all messages are logged.
subsystem
Name of the subsystem in which this function is called. The string that you specify here appears in the error log in the following format:<subsystem>: <message>
fmt, ...
Message that you want written. This message can be in printf()-style format. For example: ..., "%s\n", myString);
Returns
If successful 0 is returned, -1 if an unknown severity level is specified.