From 7b1d59c3c49108bf7b64e3a696b6b998ded16b1c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 24 Oct 2017 18:16:43 +0200 Subject: osmo-bsc: Initialize logging before initializing rate_ctr The library code for rate counter initialization, which is called from the descendants of bsc_network_alloc() might already want to log something (particularly after Change-Id Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the logging framework must be initialized before. Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f --- src/osmo-bsc/osmo_bsc_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/osmo-bsc/osmo_bsc_main.c') diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 5e8f45e93..730e1db48 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -196,6 +196,9 @@ int main(int argc, char **argv) tall_bsc_ctx = talloc_named_const(NULL, 1, "openbsc"); msgb_talloc_ctx_init(tall_bsc_ctx, 0); + osmo_init_logging(&log_info); + osmo_stats_init(tall_bsc_ctx); + /* Allocate global gsm_network struct */ rc = bsc_network_alloc(NULL); if (rc) { @@ -203,9 +206,6 @@ int main(int argc, char **argv) exit(1); } - osmo_init_logging(&log_info); - osmo_stats_init(tall_bsc_ctx); - bts_init(); libosmo_abis_init(tall_bsc_ctx); -- cgit v1.2.3