summaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-25 23:59:42 +0200
committerHarald Welte <laforge@gnumonks.org>2017-10-26 00:06:40 +0200
commit888e35aa7fbb2ba40526456abab739b7c15013e0 (patch)
tree3a7d7eab7c1c716e14de441833280ebff3ab558e /openbsc/src/osmo-bsc
parent6111ab5bacffd3acde4c3ed02ce0b8866177552b (diff)
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
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index 90651b9..6081460 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -195,6 +195,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) {
@@ -202,9 +205,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);