[PATCH 2/6] gprs/test: Increase stderr log level

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/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Thu Jul 3 11:28:13 UTC 2014


Enable the generation of more log messages.

Sponsored-by: On-Waves ehf
---
 openbsc/tests/gbproxy/gbproxy_test.c | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index c372af1..2aaf109 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -883,7 +883,28 @@ static void test_gbproxy_ra_patching()
 }
 
 
-static struct log_info info = {};
+static struct log_info_cat gprs_categories[] = {
+	[DGPRS] = {
+		.name = "DGPRS",
+		.description = "GPRS Packet Service",
+		.enabled = 1, .loglevel = LOGL_DEBUG,
+	},
+	[DNS] = {
+		.name = "DNS",
+		.description = "GPRS Network Service (NS)",
+		.enabled = 1, .loglevel = LOGL_INFO,
+	},
+	[DBSSGP] = {
+		.name = "DBSSGP",
+		.description = "GPRS BSS Gateway Protocol (BSSGP)",
+		.enabled = 1, .loglevel = LOGL_DEBUG,
+	},
+};
+
+static struct log_info info = {
+	.cat = gprs_categories,
+	.num_cat = ARRAY_SIZE(gprs_categories),
+};
 
 int main(int argc, char **argv)
 {
@@ -893,7 +914,8 @@ int main(int argc, char **argv)
 	osmo_signal_register_handler(SS_L_NS, &test_signal, NULL);
 
 	log_set_print_filename(osmo_stderr_target, 0);
-	log_set_log_level(osmo_stderr_target, LOGL_INFO);
+	log_set_log_level(osmo_stderr_target, LOGL_DEBUG);
+	log_set_all_filter(osmo_stderr_target, 1);
 
 	rate_ctr_init(NULL);
 
-- 
1.9.1





More information about the OpenBSC mailing list