Hi

Many applets are daemons (or can be run as daemons) and send messages to
syslog. The problem is that the messages don't have accurate, individually
assigned severity; they are all LOG_ERR. Effectively, system administrator sees
a lot of ERRORs in the log even when everything goes well. It seems that libbb
provides only bb_error_msg() as a convenient way to print a message (including
sending it to syslog), while a more generic function taking severity as well
would be needed instead. grep -r 'syslog(' shows that only some loginutils call
syslog() directly. In other places bb_error_msg() is used even for
informational or verbose debugging messages. Just have a look at output of
grep -r 'bb_error_msg('

Do you have an idea how to clean this up? Shouldn't these messages be sent to a
new function, e.g. bb_msg(), which would additionally take "severity" argument?
Lowering the hardcoded syslog_level=LOG_ERR globally is not an option because
real errors must remain errors.

Examples of invalid error messages from just 2 applets under "networking"
subdirectory (ifplugd & udhcpc):

ifplugd(wlan0): started: BusyBox v1.27.2 (2017-11-23 00:34:48 CET)
ifplugd(wlan0): upping interface
ifplugd(wlan0): using SIOCETHTOOL detection mode
ifplugd(wlan0): link is up
ifplugd(wlan0): executing '/etc/rc.d/ifplugd.sh wlan0 up'
ifplugd(wlan0): exit code: 0
udhcpc[997]: started, v1.27.2
udhcpc[997]: sending discover
udhcpc[997]: sending select for 192.168.1.222
udhcpc[997]: lease of 192.168.1.222 obtained, lease time 86400
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to