Complete Contents
Getting Started
Chapter 1 Understanding Server Plug-Ins
Chapter 2 Writing and Compiling Plug-Ins
Chapter 3 Calling the Front-End API Functions
Chapter 4 Quick Start
Chapter 5 Writing Database Plug-Ins
Chapter 6 Writing Pre/Post-Operation Plug-Ins
Chapter 7 Defining Functions for LDAP Operations
Chapter 8 Defining Functions for Database Operations
Chapter 9 Defining Functions for Authentication
Chapter 10 Writing Entry Store/Fetch Plug-Ins
Chapter 11 Writing Extended Operation Plug-Ins
Chapter 12 Writing Matching Rule Plug-Ins
Chapter 13 Data Type and Structure Reference
Chapter 14 Function Reference
Chapter 15 Parameter Reference
Glossary
Previous Next Contents Bookshelf Function List



 slapi_log_error()
Writes a message to the error log for the directory server. (By default, the error log file is <server_root>/<server_id>/logs/errors.)

Syntax

#include "slapi-plugin.h"
int slapi_log_error( int severity, char *subsystem, char *fmt, ... );
Parameters

The function has the following parameters:
severity
Level of severity of the message. In combination with the severity level specified by the administrator, this determines whether or not the message is written to the log.
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_name>: <message>
fmt, ...
Message that you want written. This message can be in printf()-style format. For example: ..., "%s\n", myString);

The severity argument corresponds to the Log Level setting selected by in the Server Manager under Server Preferences | LDAP. If a Log Level setting is selected, messages with that severity level are written to the error log. The severity argument can have one of the following values:
SLAPI_LOG_FATAL
Always written to the error log.
This severity level indicates that a fatal error has occured in the server.
SLAPI_LOG_TRACE
Written to the error log if the Log Level setting "Trace function calls" is selected.
This severity level is typically used to indicate what function is being called.
SLAPI_LOG_PACKETS
Written to the error log if the Log Level setting "Packet handling" is selected.
SLAPI_LOG_ARGS
Written to the error log if the Log Level setting "Heavy trace output" is selected.
SLAPI_LOG_CONNS
Written to the error log if the Log Level setting "Connection management" is selected.
SLAPI_LOG_BER
Written to the error log if the Log Level setting "Packets sent/received" is selected.
SLAPI_LOG_FILTER
Written to the error log if the Log Level setting "Search filter processing" is selected.
SLAPI_LOG_CONFIG
Written to the error log if the Log Level setting "Config file processing" is selected.
SLAPI_LOG_ACL
Written to the error log if the Log Level setting "Access control list processing" is selected.
SLAPI_LOG_SHELL
Written to the error log if the Log Level setting "Log communications with shell back-ends" is selected.
SLAPI_LOG_PARSE
Written to the error log if the Log Level setting "Log entry parsing" is selected.
SLAPI_LOG_HOUSE
Written to the error log if the Log Level setting "Housekeeping" is selected.
SLAPI_LOG_REPL
Written to the error log if the Log Level setting "Replication" is selected.
SLAPI_LOG_CACHE
Written to the error log if the Log Level setting "Entry cache" is selected.
SLAPI_LOG_PLUGIN
Written to the error log if the Log Level setting "Plug-ins" is selected.
This severity level is typically used to identify messages from server plug-ins.

Returns

One of the following values:

 

© Copyright 1998 Netscape Communications Corporation