Change in libosmocore[master]: logging_vty: Ensure writing well-formed config files

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 25 18:17:16 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/11086


Change subject: logging_vty: Ensure writing well-formed config files
......................................................................

logging_vty: Ensure writing well-formed config files

We want to have well-formed config files that print exactly one space
per VTY/config node level, and not two.

Change-Id: Ia75c7067284ea225cffe13ca71bad05a7747ae66
---
M src/vty/logging_vty.c
1 file changed, 9 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/11086/1

diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index b2637a5..31edb52 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -890,24 +890,24 @@
 		break;
 	}
 
-	vty_out(vty, "  logging filter all %u%s",
+	vty_out(vty, " logging filter all %u%s",
 		tgt->filter_map & (1 << LOG_FLT_ALL) ? 1 : 0, VTY_NEWLINE);
 	/* save filters outside of libosmocore, i.e. in app code */
 	if (osmo_log_info->save_fn)
 		osmo_log_info->save_fn(vty, osmo_log_info, tgt);
 
-	vty_out(vty, "  logging color %u%s", tgt->use_color ? 1 : 0,
+	vty_out(vty, " logging color %u%s", tgt->use_color ? 1 : 0,
 		VTY_NEWLINE);
-	vty_out(vty, "  logging print category %d%s",
+	vty_out(vty, " logging print category %d%s",
 		tgt->print_category ? 1 : 0, VTY_NEWLINE);
 	if (tgt->print_ext_timestamp)
-		vty_out(vty, "  logging print extended-timestamp 1%s", VTY_NEWLINE);
+		vty_out(vty, " logging print extended-timestamp 1%s", VTY_NEWLINE);
 	else
-		vty_out(vty, "  logging timestamp %u%s",
+		vty_out(vty, " logging timestamp %u%s",
 			tgt->print_timestamp ? 1 : 0, VTY_NEWLINE);
 	if (tgt->print_level)
-		vty_out(vty, "  logging print level 1%s", VTY_NEWLINE);
-	vty_out(vty, "  logging print file %s%s",
+		vty_out(vty, " logging print level 1%s", VTY_NEWLINE);
+	vty_out(vty, " logging print file %s%s",
 		get_value_string(logging_print_file_args, tgt->print_filename2),
 		VTY_NEWLINE);
 
@@ -918,7 +918,7 @@
 			vty_out(vty, "%% Invalid log level %u for 'force-all'%s",
 				tgt->loglevel, VTY_NEWLINE);
 		else
-			vty_out(vty, "  logging level force-all %s%s", level_str, VTY_NEWLINE);
+			vty_out(vty, " logging level force-all %s%s", level_str, VTY_NEWLINE);
 	}
 
 	for (i = 0; i < osmo_log_info->num_cat; i++) {
@@ -941,7 +941,7 @@
 			continue;
 		}
 
-		vty_out(vty, "  logging level %s", cat_name);
+		vty_out(vty, " logging level %s", cat_name);
 		vty_out(vty, " %s%s", osmo_str_tolower(level_str), VTY_NEWLINE);
 	}
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia75c7067284ea225cffe13ca71bad05a7747ae66
Gerrit-Change-Number: 11086
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180925/72567d7b/attachment.htm>


More information about the gerrit-log mailing list