[MERGED] libosmo-sccp[master]: use osmo_init_logging2

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 Apr 17 14:39:34 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: use osmo_init_logging2
......................................................................


use osmo_init_logging2

Change-Id: I0d45b9381125c496a691ac5da68190b7b3479fc3
---
M examples/m3ua_example.c
M stp/stp_main.c
M tests/ss7/ss7_test.c
3 files changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/examples/m3ua_example.c b/examples/m3ua_example.c
index b3a1505..a9f455c 100644
--- a/examples/m3ua_example.c
+++ b/examples/m3ua_example.c
@@ -66,8 +66,9 @@
 {
 	const int log_cats[] = { DLSS7, DLSUA, DLM3UA, DLSCCP, DLINP };
 	unsigned int i;
-
-	osmo_init_logging(&log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "example");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &log_info);
 
 	for (i = 0; i < ARRAY_SIZE(log_cats); i++)
 		log_set_category_filter(osmo_stderr_target, log_cats[i], 1, LOGL_DEBUG);
diff --git a/stp/stp_main.c b/stp/stp_main.c
index 1e0c099..aa2304c 100644
--- a/stp/stp_main.c
+++ b/stp/stp_main.c
@@ -161,8 +161,8 @@
 	int rc;
 
 	tall_stp_ctx = talloc_named_const(NULL, 1, "osmo-stp");
-
-	osmo_init_logging(&log_info);
+	msgb_talloc_ctx_init(tall_stp_ctx, 0);
+	osmo_init_logging2(tall_stp_ctx, &log_info);
 	vty_init(&vty_info);
 
 	handle_options(argc, argv);
diff --git a/tests/ss7/ss7_test.c b/tests/ss7/ss7_test.c
index 7c51767..0c0cf25 100644
--- a/tests/ss7/ss7_test.c
+++ b/tests/ss7/ss7_test.c
@@ -280,8 +280,9 @@
 {
 	const int log_cats[] = { DLSS7, DLSUA, DLM3UA, DLSCCP, DLINP };
 	unsigned int i;
-
-	osmo_init_logging(&log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "example");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &log_info);
 
 	log_set_print_filename(osmo_stderr_target, 0);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d45b9381125c496a691ac5da68190b7b3479fc3
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list