From: Sam Leffler Date: Sun, 20 Mar 2011 09:48:42 +0000 (+0200) Subject: Add support for setting the syslog facility from the config file X-Git-Tag: hostap-1-bp~462 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e1996216ea87c25926aad11d9bb96970ee9238c;p=thirdparty%2Fhostap.git Add support for setting the syslog facility from the config file This enables setting the syslog facility at build time. --- diff --git a/src/utils/wpa_debug.c b/src/utils/wpa_debug.c index ba554efd3..b8c5e2fe4 100644 --- a/src/utils/wpa_debug.c +++ b/src/utils/wpa_debug.c @@ -78,9 +78,13 @@ void wpa_debug_print_timestamp(void) #ifdef CONFIG_DEBUG_SYSLOG +#ifndef LOG_HOSTAPD +#define LOG_HOSTAPD LOG_DAEMON +#endif /* LOG_HOSTAPD */ + 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++; } diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 19cc68503..aeb9ab98a 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -1225,6 +1225,9 @@ endif ifdef CONFIG_DEBUG_SYSLOG CFLAGS += -DCONFIG_DEBUG_SYSLOG +ifdef CONFIG_DEBUG_SYSLOG_FACILITY +CFLAGS += -DLOG_HOSTAPD="$(CONFIG_DEBUG_SYSLOG_FACILITY)" +endif endif ifdef CONFIG_DEBUG_FILE