Re: [PATCH] Change logging level for CTRL-EVENT-SIGNAL-CHANGE to MSG_DEBUG

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

 



On Mon, Dec 23, 2024, at 7:21 AM, Jouni Malinen wrote:
> On Thu, Nov 28, 2024 at 12:18:37AM +0900, Kan-Ru Chen wrote:
>> The default logging level for the CTRL-EVENT-SIGNAL-CHANGE message
>> may be repeated many times and fill the log file or journal.
>> 
>> For example https://bugzilla.redhat.com/show_bug.cgi?id=2309148 and
>> the first few results from searching CTRL-EVENT-SIGNAL-CHANGE on the
>> web contain various complaints and workarounds.
>> 
>> Changing the logging level to MSG_DEBUG would allow the message to
>> be still useful for debugging.
>
> This event is not really for debugging purposes, but for providing it to
> any upper layer component that is listening to event message in the
> wpa_supplicant control interface.
>
>> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
>> @@ -6755,7 +6755,7 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
>>  	case EVENT_SIGNAL_CHANGE:
>> -		wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_SIGNAL_CHANGE
>> +		wpa_msg(wpa_s, MSG_DEBUG, WPA_EVENT_SIGNAL_CHANGE
>>  			"above=%d signal=%d noise=%d txrate=%lu",
>
> This would break existing uses for the wpa_supplicant control interface.
> I'm not completely sure how those system log messages get collected, but
> a more appropriate change might be to replace this wpa_msg() call with a
> call to wpa_msg_ctrl() with the exact same set of parameters. That would
> remove the print from stdout and hopefully from the undesired system log
> mechanisms.

Thanks for pointing me to wpa_msg_ctrl(). The comment for wpa_msg_ctrl()
also mentioned it can be used for frequent events that do not need to be
sent to syslog. I'll send an updated patch.

Kan-Ru

_______________________________________________
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