Add support for setting the syslog facility from the config file

This enables setting the syslog facility at build time.
This commit is contained in:
Sam Leffler 2011-03-20 11:48:42 +02:00 committed by Jouni Malinen
parent c76e5d7f9b
commit 3e1996216e
2 changed files with 8 additions and 1 deletions

View file

@ -78,9 +78,13 @@ void wpa_debug_print_timestamp(void)
#ifdef CONFIG_DEBUG_SYSLOG #ifdef CONFIG_DEBUG_SYSLOG
#ifndef LOG_HOSTAPD
#define LOG_HOSTAPD LOG_DAEMON
#endif /* LOG_HOSTAPD */
void wpa_debug_open_syslog(void) void wpa_debug_open_syslog(void)
{ {
openlog("wpa_supplicant", LOG_PID | LOG_NDELAY, LOG_DAEMON); openlog("wpa_supplicant", LOG_PID | LOG_NDELAY, LOG_HOSTAPD);
wpa_debug_syslog++; wpa_debug_syslog++;
} }

View file

@ -1225,6 +1225,9 @@ endif
ifdef CONFIG_DEBUG_SYSLOG ifdef CONFIG_DEBUG_SYSLOG
CFLAGS += -DCONFIG_DEBUG_SYSLOG CFLAGS += -DCONFIG_DEBUG_SYSLOG
ifdef CONFIG_DEBUG_SYSLOG_FACILITY
CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)"
endif
endif endif
ifdef CONFIG_DEBUG_FILE ifdef CONFIG_DEBUG_FILE