Change in libosmocore[master]: vty/logging: ensure consistent '%' prefix for warnings

laforge gerrit-no-reply at lists.osmocom.org
Wed Apr 7 16:33:18 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/23629 )

Change subject: vty/logging: ensure consistent '%' prefix for warnings
......................................................................

vty/logging: ensure consistent '%' prefix for warnings

Change-Id: I2b2bab61e46668c3b4b0ccad88d02b6d00a83544
---
M src/vty/logging_vty.c
M tests/logging/logging_vty_test.vty
2 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index cc250c0..5f31b39 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -131,7 +131,7 @@
 
 	conn = (struct telnet_connection *) vty->priv;
 	if (conn->dbg) {
-		vty_out(vty, "Logging already enabled.%s", VTY_NEWLINE);
+		vty_out(vty, "%% Logging already enabled.%s", VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
@@ -158,7 +158,7 @@
 
 	conn = (struct telnet_connection *) vty->priv;
 	if (!conn->dbg)
-		vty_out(vty, "Logging was not enabled.%s", VTY_NEWLINE);
+		vty_out(vty, "%% Logging was not enabled.%s", VTY_NEWLINE);
 
 	return conn->dbg;
 }
@@ -372,12 +372,12 @@
 	int level = log_parse_level(argv[1]);
 
 	if (level < 0) {
-		vty_out(vty, "Invalid level '%s'%s", argv[1], VTY_NEWLINE);
+		vty_out(vty, "%% Invalid level '%s'%s", argv[1], VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
 	if (category < 0) {
-		vty_out(vty, "Invalid category '%s'%s", argv[0], VTY_NEWLINE);
+		vty_out(vty, "%% Invalid category '%s'%s", argv[0], VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
@@ -595,7 +595,7 @@
 	char **dptr = vty->index_sub;
 
 	if (!dptr) {
-		vty_out(vty, "vty->index_sub == NULL%s", VTY_NEWLINE);
+		vty_out(vty, "%% vty->index_sub == NULL%s", VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
@@ -616,7 +616,7 @@
 	char **dptr = vty->index_sub;
 
 	if (!dptr) {
-		vty_out(vty, "vty->index_sub == NULL%s", VTY_NEWLINE);
+		vty_out(vty, "%% vty->index_sub == NULL%s", VTY_NEWLINE);
 		return CMD_WARNING;
 	}
 
diff --git a/tests/logging/logging_vty_test.vty b/tests/logging/logging_vty_test.vty
index 91c2a48..30e73ab 100644
--- a/tests/logging/logging_vty_test.vty
+++ b/tests/logging/logging_vty_test.vty
@@ -29,7 +29,7 @@
 logging_vty_test(config)# exit
 
 logging_vty_test# logging level force-all notice
-Logging was not enabled.
+% Logging was not enabled.
 
 logging_vty_test# logging enable
 logging_vty_test# logging filter all 1

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23629
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2b2bab61e46668c3b4b0ccad88d02b6d00a83544
Gerrit-Change-Number: 23629
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210407/9250221b/attachment.htm>


More information about the gerrit-log mailing list