hostapd: logging to syslog (and in general)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

As you may know, there are few logging functions used in hostapd
project. The hostapd itself uses mainly following two:
1) hostapd_logger
2) wpa_printf

I'm running hostapd in the background (-B) so logging to syslog is
preferred way for me. Unfortunately there comes a problem. I can use
logger_syslog option but if affects messages printed with
hostapd_logger only. None of wpa_printf messages goes into the syslog
which means I'm missing a lot of important stuff including even
MSG_ERROR-s.

I'm looking for a way to fix/change this but it seems it won't be
straightforward.

First of all, _wpa_printf is capable of logging to syslog, however:
1) It needs enabling with wpa_debug_open_syslog which hostapd never does
2) Logging to syslog equals not printing to stdout (it's kind of XOR)

We can't simply add a call to the wpa_debug_open_syslog in hostapd
(e.g. in hostapd_global_init). This would redirect all wpa_printf
output to the syslog and hostapd_logger_cb uses wpa_printf for stdout
printing.

I was thinking about a way of fixing this but then I noticed how many
dependencies, different functions, config options, etc. do we have in
hostapd all around.

I'm wondering if there is any plan to handle messages printing a bit
easier? Or do you have any advises where to start? It seems to need
some refactoring and opinion of someone with better overview would be
great.

It seems it grew a bit overcomplicated with all these wpa_printf,
wpa_msg, wpa_dbg, MSG_(DEBUG|INFO|WARNING|ERROR),
HOSTAPD_LEVEL_DEBUG(VERBOSE|DEBUG|INFO|NOTICE|WARNING),
hostapd_logger_cb, callbacks, etc.

-- 
Rafał

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux