[PATCH] osmo-bsc[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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Apr 17 13:18:55 UTC 2018


Review at  https://gerrit.osmocom.org/7856

use osmo_init_logging2

Change-Id: Ifbbfede185aec6573fe7d8bcb49dc5be9f7e7d0b
---
M tests/bsc-nat-trie/bsc_nat_trie_test.c
M tests/bsc-nat/bsc_nat_test.c
M tests/bssap/bssap_test.c
3 files changed, 8 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/7856/1

diff --git a/tests/bsc-nat-trie/bsc_nat_trie_test.c b/tests/bsc-nat-trie/bsc_nat_trie_test.c
index 1c48564..32323d9 100644
--- a/tests/bsc-nat-trie/bsc_nat_trie_test.c
+++ b/tests/bsc-nat-trie/bsc_nat_trie_test.c
@@ -39,8 +39,8 @@
 int main(int argc, char **argv)
 {
 	struct nat_rewrite *trie;
-
-	osmo_init_logging(&log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "bsc_nat_trie_test");
+	osmo_init_logging2(tall_ctx, &log_info);
 
 	printf("Testing the trie\n");
 
diff --git a/tests/bsc-nat/bsc_nat_test.c b/tests/bsc-nat/bsc_nat_test.c
index bb287ec..7aa39ec 100644
--- a/tests/bsc-nat/bsc_nat_test.c
+++ b/tests/bsc-nat/bsc_nat_test.c
@@ -1559,9 +1559,10 @@
 
 int main(int argc, char **argv)
 {
-	msgb_talloc_ctx_init(NULL, 0);
+	void *tall_ctx = talloc_named_const(NULL, 1, "bsc_nat_test");
+	msgb_talloc_ctx_init(tall_ctx, 0);
 	sccp_set_log_area(DLSCCP);
-	osmo_init_logging(&log_info);
+	osmo_init_logging2(tall_ctx, &log_info);
 
 	test_filter();
 	test_contrack();
diff --git a/tests/bssap/bssap_test.c b/tests/bssap/bssap_test.c
index 00d925d..00bc64c 100644
--- a/tests/bssap/bssap_test.c
+++ b/tests/bssap/bssap_test.c
@@ -140,7 +140,9 @@
 
 int main(int argc, char **argv)
 {
-	osmo_init_logging(&log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "bssap_test");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &log_info);
 	log_set_use_color(osmo_stderr_target, 0);
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_print_filename(osmo_stderr_target, 0);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbbfede185aec6573fe7d8bcb49dc5be9f7e7d0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list