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-slapdSysLogLevelin theibmslapd.conffile, determines whether the message is written to the log. The severity must be one of the following values :LDAP_MSG_LOWLDAP_MSG_MEDLDAP_MSG_HIGH
ibmslapd.conffile results in a medium logging level:
With this example in your#ibm-slapdSysLogLevel must be one of l/m/h (l=terse, h=verbose) ibm-slapdSysLogLevel: mibmslapd.conffile, log messages with severityLDAP_MSG_HIGHorLDAP_MSG_MEDare logged. The messages with severityLDAP_MSG_LOWare not logged. If theslapdSysLogLevelis set toh, 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()-styleformat. For example:..., "%s\n", myString);
- Returns
- If successful 0 is returned, -1 if an unknown severity level is specified.