use osmo_init_logging2

Change-Id: If4449cce1af46be22cc370abd3a6da8e22a31fa5
diff --git a/tests/auc/auc_test.c b/tests/auc/auc_test.c
index e9c114c..e23cc02 100644
--- a/tests/auc/auc_test.c
+++ b/tests/auc/auc_test.c
@@ -610,7 +610,9 @@
 
 	handle_options(argc, argv);
 
-	osmo_init_logging(&hlr_log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "auc_test");
+
+	osmo_init_logging2(tall_ctx, &hlr_log_info);
 	log_set_print_filename(osmo_stderr_target, cmdline_opts.verbose);
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
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 37f47c3..a78bddb 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
@@ -29,6 +29,7 @@
 #include <osmocom/core/application.h>
 #include <osmocom/core/utils.h>
 #include <osmocom/core/logging.h>
+#include <osmocom/core/msgb.h>
 
 #include <osmocom/crypt/auth.h>
 
@@ -102,7 +103,9 @@
 int main()
 {
 	printf("3GPP TS 55.205 Test Sets\n");
-	osmo_init_logging(&hlr_log_info);
+	void *tall_ctx = talloc_named_const(NULL, 1, "test");
+	msgb_talloc_ctx_init(tall_ctx, 0);
+	osmo_init_logging2(tall_ctx, &hlr_log_info);
 	log_set_print_filename(osmo_stderr_target, 0);
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);
diff --git a/tests/db/db_test.c b/tests/db/db_test.c
index 6bf7a86..058588b 100644
--- a/tests/db/db_test.c
+++ b/tests/db/db_test.c
@@ -839,7 +839,7 @@
 
 	handle_options(argc, argv);
 
-	osmo_init_logging(&hlr_log_info);
+	osmo_init_logging2(ctx, &hlr_log_info);
 	log_set_print_filename(osmo_stderr_target, cmdline_opts.verbose);
 	log_set_print_timestamp(osmo_stderr_target, 0);
 	log_set_use_color(osmo_stderr_target, 0);