1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#ifndef _LLOG_H
1N/A#define _LLOG_H
1N/A
1N/A
1N/A#include <stdio.h>
1N/A#include <sys/types.h>
1N/A#include <sys/stat.h>
1N/A#include <nl_types.h>
1N/A#include <limits.h>
1N/A#include <syslog.h>
1N/A#include <portable.h>
1N/A
1N/A
1N/A
1N/A/* Log levels */
1N/A
1N/A/* slapd values */
1N/A#define LDAP_DEBUG_TRACE 0x001
1N/A#define LDAP_DEBUG_PACKETS 0x002
1N/A#define LDAP_DEBUG_ARGS 0x004
1N/A#define LDAP_DEBUG_CONNS 0x008
1N/A#define LDAP_DEBUG_BER 0x010
1N/A#define LDAP_DEBUG_FILTER 0x020
1N/A#define LDAP_DEBUG_CONFIG 0x040
1N/A#define LDAP_DEBUG_ACL 0x080
1N/A#define LDAP_DEBUG_STATS 0x100
1N/A#define LDAP_DEBUG_STATS2 0x200
1N/A#define LDAP_DEBUG_SHELL 0x400
1N/A#define LDAP_DEBUG_PARSE 0x800
1N/A/* More values for http gateway */
1N/A#define LDAP_DEBUG_GWAY 0x1000
1N/A#define LDAP_DEBUG_GWAYMORE 0x2000
1N/A/* Generic values */
1N/A#define LDAP_DEBUG_ANY 0xffff
1N/A
1N/Anl_catd sundscat;
1N/Aextern nl_catd slapdcat;
1N/Aextern void ldaplogconfig(char * logf, int size);
1N/Aextern void ldaplogconfigf(FILE *fd);
1N/Aextern void ldaploginit(char *name,
1N/A int facility);
1N/Aextern void ldaploginitlevel(char *name,
1N/A int facility,
1N/A int log_level);
1N/Aextern void ldaplog(int level,char *fmt,...);
1N/A
1N/A#define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
1N/A{ \
1N/A if ( log_debug & level ) \
1N/A fprintf( stderr, fmt, connid, opid, arg1, arg2, arg3 );\
1N/A if ( log_syslog & level ) \
1N/A ldaplog( level, fmt, connid, opid, arg1, arg2, arg3 ); \
1N/A}
1N/A#endif /* _LLOG_H */
1N/A
1N/A
1N/A
1N/A