#include <ac/string.h>
#include <ac/time.h>
+#ifdef LDAP_SYSLOG
+#include <ac/syslog.h>
+#endif
+
#include "ldap_log.h"
#include "ldap_defaults.h"
#include "lber.h"
static FILE *log_file = NULL;
static int global_level = 0;
-#if 0
#ifdef LDAP_SYSLOG
static int use_syslog = 0;
static int debug2syslog(int l) {
switch (l) {
- /* insert mapping cases here */
- default:
+ case LDAP_LEVEL_EMERG: return LOG_EMERG;
+ case LDAP_LEVEL_ALERT: return LOG_ALERT;
+ case LDAP_LEVEL_CRIT: return LOG_CRIT;
+ case LDAP_LEVEL_ERR: return LOG_ERR;
+ case LDAP_LEVEL_WARNING: return LOG_WARNING;
+ case LDAP_LEVEL_NOTICE: return LOG_NOTICE;
+ case LDAP_LEVEL_INFO: return LOG_INFO;
}
- return LOG_DEBUG
+ return LOG_DEBUG;
}
#endif
-#endif
static char *lutil_levels[] = {"emergency", "alert", "critical",
"error", "warning", "notice",
return;
}
-#if 0
#ifdef LDAP_SYSLOG
/* we're configured to use syslog */
if( use_syslog ) {
return;
}
#endif
-#endif
#if 0
#ifdef HAVE_WINSOCK