diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-06-13 16:37:24 +0200 |
---|---|---|
committer | laforge <laforge@gnumonks.org> | 2019-07-16 04:00:19 +0000 |
commit | afe987f848f11ceb48c7be1f7842df44363efcd0 (patch) | |
tree | e494389aaf9e417d89ed6de8c11d93e04bbdd7e8 /src/osmo-bsc/bts_ipaccess_nanobts.c | |
parent | 4d4db8c7b553d784a21c585884fcfc43f5cc0cc3 (diff) |
logging: introduce LOG_BTS and LOG_TRX and use it everywhere
It's quite ugly to have manual "bts=%d" printf-statements all over
the BSC code. Let's change this to use shared logging helper functions
all over the place, whenever we need to log something related to one
BTS or one TRX.
This can also help us as the first step to later add alternative logging
of BTS identities, e.g. by printing the Cell Global Identifier or
LAC+CI, or even a human-readable/vty-defined 'name' of the BTS, rather
than its numeric bts number. With this change in place, we can
introduce such changes at a single location in the code.
Change-Id: I4a7814d164384eecfb6913c31802cf2faead6e6c
Diffstat (limited to 'src/osmo-bsc/bts_ipaccess_nanobts.c')
-rw-r--r-- | src/osmo-bsc/bts_ipaccess_nanobts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 56103b6f2..a5e697be1 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -394,7 +394,7 @@ void ipaccess_drop_rsl(struct gsm_bts_trx *trx, const char *reason) if (!trx->rsl_link) return; - LOGP(DLINP, LOGL_NOTICE, "(bts=%d,trx=%d) Dropping RSL link: %s\n", trx->bts->nr, trx->nr, reason); + LOG_TRX(trx, DLINP, LOGL_NOTICE, "Dropping RSL link: %s\n", reason); e1inp_sign_link_destroy(trx->rsl_link); trx->rsl_link = NULL; @@ -413,7 +413,7 @@ void ipaccess_drop_oml(struct gsm_bts *bts, const char *reason) if (!bts->oml_link) return; - LOGP(DLINP, LOGL_NOTICE, "(bts=%d) Dropping OML link: %s\n", bts->nr, reason); + LOG_BTS(bts, DLINP, LOGL_NOTICE, "Dropping OML link: %s\n", reason); e1inp_sign_link_destroy(bts->oml_link); bts->oml_link = NULL; bts->uptime = 0; @@ -459,7 +459,7 @@ static void ipaccess_drop_oml_deferred_cb(void *data) void ipaccess_drop_oml_deferred(struct gsm_bts *bts) { if (!osmo_timer_pending(&bts->oml_drop_link_timer) && bts->oml_link) { - LOGP(DLINP, LOGL_NOTICE, "(bts=%d) Deferring Drop of OML link.\n", bts->nr); + LOG_BTS(bts, DLINP, LOGL_NOTICE, "Deferring Drop of OML link.\n"); osmo_timer_setup(&bts->oml_drop_link_timer, ipaccess_drop_oml_deferred_cb, bts); osmo_timer_schedule(&bts->oml_drop_link_timer, 0, 0); } |