8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libldap5 / include / ldap / log.h
blob4cd45820f2c75218dd70e8ac18858701441c8c5c
1 #pragma ident "%Z%%M% %I% %E% SMI"
3 #ifndef _LLOG_H
4 #define _LLOG_H
7 #include <stdio.h>
8 #include <sys/types.h>
9 #include <sys/stat.h>
10 #include <nl_types.h>
11 #include <limits.h>
12 #include <syslog.h>
13 #include <portable.h>
17 /* Log levels */
19 /* slapd values */
20 #define LDAP_DEBUG_TRACE 0x001
21 #define LDAP_DEBUG_PACKETS 0x002
22 #define LDAP_DEBUG_ARGS 0x004
23 #define LDAP_DEBUG_CONNS 0x008
24 #define LDAP_DEBUG_BER 0x010
25 #define LDAP_DEBUG_FILTER 0x020
26 #define LDAP_DEBUG_CONFIG 0x040
27 #define LDAP_DEBUG_ACL 0x080
28 #define LDAP_DEBUG_STATS 0x100
29 #define LDAP_DEBUG_STATS2 0x200
30 #define LDAP_DEBUG_SHELL 0x400
31 #define LDAP_DEBUG_PARSE 0x800
32 /* More values for http gateway */
33 #define LDAP_DEBUG_GWAY 0x1000
34 #define LDAP_DEBUG_GWAYMORE 0x2000
35 /* Generic values */
36 #define LDAP_DEBUG_ANY 0xffff
38 nl_catd sundscat;
39 extern nl_catd slapdcat;
40 extern void ldaplogconfig(char * logf, int size);
41 extern void ldaplogconfigf(FILE *fd);
42 extern void ldaploginit(char *name,
43 int facility);
44 extern void ldaploginitlevel(char *name,
45 int facility,
46 int log_level);
47 extern void ldaplog(int level,char *fmt,...);
49 #define Statslog( level, fmt, connid, opid, arg1, arg2, arg3 ) \
50 { \
51 if ( log_debug & level ) \
52 fprintf( stderr, fmt, connid, opid, arg1, arg2, arg3 );\
53 if ( log_syslog & level ) \
54 ldaplog( level, fmt, connid, opid, arg1, arg2, arg3 ); \
56 #endif /* _LLOG_H */