From 5d9cb9f55534cd828290fced6dddd3094d4c1aa4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 12 Dec 2018 23:57:13 +0100 Subject: osmo-bts-trx/loops.c: Use lchan name based logging The loops.c code dates back to ancient times when we printed the TRX number and the raw channel number to identify a logical channel. We meanwhile have gsm_lchan_name() and should use it to log messages related to this lchan in a common format. This commit introduces the LOGPLCHAN() helper macro [similar to osmo-bsc], and uses it from loops.c. As a result, some functions don't need a chan_nr argument anymore, while some need to add a new lchan argument. Change-Id: I6976dd7444c26b1f52741bc367b0311ebbef1718 Related: OS#1622, OS#1851 --- include/osmo-bts/gsm_data.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 9e62cdf0..1de5eddd 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -24,6 +24,8 @@ #define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41 #define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91 +#define LOGPLCHAN(lchan, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_lchan_name(lchan), ## args) + struct gsm_network { struct llist_head bts_list; unsigned int num_bts; -- cgit v1.2.3