diff options
author | Max <msuraev@sysmocom.de> | 2017-12-15 17:36:45 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2017-12-20 14:14:40 +0000 |
commit | c21f007277713b15d9a48d0bcc6f28aa51b4f908 (patch) | |
tree | 775a15826b9aff9ddf11005057633d15cf4b8fbd /src/tbf_ul.cpp | |
parent | ea9968f6854cbfe79506efedc43a953a7c38cdd6 (diff) |
Introduce LOGTBF* for consistent logging
When troubleshooting complex issues with TBF lifecycle, it's much easier
to follow the logs which are consistently formatted. Add LOGTBF*() macro
similar to struct-specific log routines we use in other Osmocom project
and use it to log TBF-related messages in a unified way. Tweak test
output accordingly.
Related: OS#2407
Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea
Diffstat (limited to 'src/tbf_ul.cpp')
-rw-r--r-- | src/tbf_ul.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 0bbb817d..09ee1f04 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -84,8 +84,7 @@ int gprs_rlcmac_ul_tbf::assemble_forward_llc(const gprs_rlc_data *_data) if (frame->is_complete) { /* send frame to SGSN */ - LOGP(DRLCMACUL, LOGL_INFO, "%s complete UL frame len=%d\n", - tbf_name(this) , m_llc.frame_length()); + LOGPTBFUL(this, LOGL_INFO, "complete UL frame len=%d\n", m_llc.frame_length()); snd_ul_ud(); bts->llc_ul_bytes(m_llc.frame_length()); m_llc.reset(); @@ -128,9 +127,8 @@ struct msgb *gprs_rlcmac_ul_tbf::create_ul_ack(uint32_t fn, uint8_t ts) if (final) { if (poll_state == GPRS_RLCMAC_POLL_SCHED && ul_ack_state == GPRS_RLCMAC_UL_ACK_WAIT_ACK) { - LOGP(DRLCMACUL, LOGL_DEBUG, "Polling is already " - "scheduled for %s, so we must wait for " - "the final uplink ack...\n", tbf_name(this)); + LOGPTBFUL(this, LOGL_DEBUG, + "Polling is already scheduled, so we must wait for the final uplink ack...\n"); return NULL; } |