-#if defined(WANT_FTICKS)
-int debug_set_ftickssyslogfacility(char *dest) {
- int i;
- if (!strncasecmp(dest, "x-syslog://", 11)) {
- dest += 11;
- if (*dest == '/')
- dest++;
- }
- if (*dest) {
- for (i = 0; facstrings[i]; i++)
- if (!strcasecmp(dest, facstrings[i]))
- break;
- if (!facstrings[i]) {
- debug(DBG_ERR, "Unknown syslog facility %s for F-Ticks, assuming default", dest);
- fticks_syslogfacility = 0;
- } else
- fticks_syslogfacility = facvals[i];
- } else {
- fticks_syslogfacility = 0;
- }
- if (fticks_syslogfacility && !debug_syslogfacility) {
- openlog(debug_ident, LOG_PID, fticks_syslogfacility);
- }
- return 1;
-}
-#endif
-
-int debug_set_destination(char *dest) {
+int debug_set_destination(char *dest, int l) {
+ static const char *facstrings[] = { "LOG_DAEMON", "LOG_MAIL", "LOG_USER", "LOG_LOCAL0",
+ "LOG_LOCAL1", "LOG_LOCAL2", "LOG_LOCAL3", "LOG_LOCAL4",
+ "LOG_LOCAL5", "LOG_LOCAL6", "LOG_LOCAL7", NULL };
+ static const int facvals[] = { LOG_DAEMON, LOG_MAIL, LOG_USER, LOG_LOCAL0,
+ LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4,
+ LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7 };