diff mbox series

wpa_supplicant: s/MSG_INFO/MSG_DEBUG/ for messages starting "Successfully"

Message ID 20250102172143.641599-1-w1.fi@pileofstuff.org
State Changes Requested
Headers show
Series wpa_supplicant: s/MSG_INFO/MSG_DEBUG/ for messages starting "Successfully" | expand

Commit Message

Andrew Sayers Jan. 2, 2025, 5:21 p.m. UTC
Most messages of the form "Successfully..." are set to MSG_DEBUG.
Standardising the outliers will make logs easier to read.

Signed-off-by: Andrew Sayers <w1.fi@pileofstuff.org>
---
 wpa_supplicant/events.c | 2 +-
 wpa_supplicant/main.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Jouni Malinen Jan. 26, 2025, 8:33 p.m. UTC | #1
On Thu, Jan 02, 2025 at 05:21:43PM +0000, Andrew Sayers wrote:
> Most messages of the form "Successfully..." are set to MSG_DEBUG.
> Standardising the outliers will make logs easier to read.

> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> @@ -3111,7 +3111,7 @@ static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
>  		goto fail;
>  	}
>  	wpa_s->enabled_4addr_mode = 1;
> -	wpa_msg(wpa_s, MSG_INFO, "Successfully set 4addr mode");
> +	wpa_msg(wpa_s, MSG_DEBUG, "Successfully set 4addr mode");

Using wpa_msg() with MSG_DEBUG is not really ideal since the control
interface is at MSG_INFO verbosity by default and this would not be any
different from using wpa_printf(). wpa_dbg() would be more approriate
for this.

> diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
> @@ -346,7 +346,7 @@ int main(int argc, char *argv[])
> -		wpa_printf(MSG_INFO, "Successfully initialized "
> +		wpa_printf(MSG_DEBUG, "Successfully initialized "
>  			   "wpa_supplicant");

This is at MSG_INFO level by design to print out something and not just
leave a completely empty stdout output when starting wpa_supplicant with
a configuration that does not automatically start any specific visible
action.
diff mbox series

Patch

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 2be597409..0410cac23 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -3111,7 +3111,7 @@  static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
 		goto fail;
 	}
 	wpa_s->enabled_4addr_mode = 1;
-	wpa_msg(wpa_s, MSG_INFO, "Successfully set 4addr mode");
+	wpa_msg(wpa_s, MSG_DEBUG, "Successfully set 4addr mode");
 	return;
 
 fail:
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
index 9229eb51f..90b25205f 100644
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
@@ -346,7 +346,7 @@  int main(int argc, char *argv[])
 		exitcode = -1;
 		goto out;
 	} else {
-		wpa_printf(MSG_INFO, "Successfully initialized "
+		wpa_printf(MSG_DEBUG, "Successfully initialized "
 			   "wpa_supplicant");
 	}