[MERGED] osmo-hlr[master]: fix default logging levels to NOTICE, not DEBUG

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Oct 28 17:10:42 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: fix default logging levels to NOTICE, not DEBUG
......................................................................


fix default logging levels to NOTICE, not DEBUG

Tweak unit test binaries to still used DEBUG loglevels, so that their expected
outputs remain unchanged (and nicely verbose).

Adjust test_nodes.vty, now expecting the 'notice' log levels upon
'show running-config'.

Change-Id: Ic061e61c9625b49cef8bc2a2c0b936e262c22268
---
M src/logging.c
M tests/auc/auc_test.c
M tests/auc/gen_ts_55_205_test_sets/main_template.c
M tests/db/db_test.c
M tests/test_nodes.vty
5 files changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/logging.c b/src/logging.c
index 9b8de45..f81781d 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -5,19 +5,19 @@
 	[DMAIN] = {
 		.name = "DMAIN",
 		.description = "Main Program",
-		.enabled = 1, .loglevel = LOGL_DEBUG,
+		.enabled = 1, .loglevel = LOGL_NOTICE,
 	},
 	[DDB] = {
 		.name = "DDB",
 		.description = "Database Layer",
 		.color = "\033[1;31m",
-		.enabled = 1, .loglevel = LOGL_DEBUG,
+		.enabled = 1, .loglevel = LOGL_NOTICE,
 	},
 	[DAUC] = {
 		.name = "DAUC",
 		.description = "Authentication Center",
 		.color = "\033[1;33m",
-		.enabled = 1, .loglevel = LOGL_DEBUG,
+		.enabled = 1, .loglevel = LOGL_NOTICE,
 	},
 };
 
diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c
index f047a97..e9c114c 100644
--- a/tests/auc/auc_test.c
+++ b/tests/auc/auc_test.c
@@ -615,6 +615,7 @@
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_category(osmo_stderr_target, 1);
+	log_parse_category_mask(osmo_stderr_target, "DMAIN,1:DDB,1:DAUC,1");
 
 	test_gen_vectors_2g_only();
 	test_gen_vectors_2g_plus_3g();
diff --git a/tests/auc/gen_ts_55_205_test_sets/main_template.c b/tests/auc/gen_ts_55_205_test_sets/main_template.c
index e917e71..37f47c3 100644
--- a/tests/auc/gen_ts_55_205_test_sets/main_template.c
+++ b/tests/auc/gen_ts_55_205_test_sets/main_template.c
@@ -107,6 +107,7 @@
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_category(osmo_stderr_target, 1);
+	log_parse_category_mask(osmo_stderr_target, "DMAIN,1:DDB,1:DAUC,1");
 
 FUNCTION_CALLS
 
diff --git a/tests/db/db_test.c b/tests/db/db_test.c
index 0a53370..389ed00 100644
--- a/tests/db/db_test.c
+++ b/tests/db/db_test.c
@@ -816,6 +816,7 @@
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_category(osmo_stderr_target, 1);
+	log_parse_category_mask(osmo_stderr_target, "DMAIN,1:DDB,1:DAUC,1");
 
 	/* omit the SQLite version and compilation flags from test output */
 	log_set_log_level(osmo_stderr_target, LOGL_ERROR);
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index 0de4ff4..6de673a 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -101,9 +101,9 @@
   logging print category 1
   logging print extended-timestamp 1
   logging level all debug
-  logging level main debug
-  logging level db debug
-  logging level auc debug
+  logging level main notice
+  logging level db notice
+  logging level auc notice
 ...
 !
 line vty

-- 
To view, visit https://gerrit.osmocom.org/4442
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic061e61c9625b49cef8bc2a2c0b936e262c22268
Gerrit-PatchSet: 2
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list