Browse Source

Add support for setting the syslog facility from the config file

This enables setting the syslog facility at build time.
Sam Leffler 14 years ago
parent
commit
3e1996216e
2 changed files with 8 additions and 1 deletions
  1. 5 1
      src/utils/wpa_debug.c
  2. 3 0
      wpa_supplicant/Makefile

+ 5 - 1
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++;
 }
 

+ 3 - 0
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