logging sanitization (use proper log levels, etc.)
This commit is contained in:
parent
f788d79411
commit
288d0c04c8
|
@ -35,7 +35,7 @@ static struct log_info_cat bts_log_info_cat[] = {
|
|||
.name = "DRSL",
|
||||
.description = "A-bis Radio Siganlling Link (RSL)",
|
||||
.color = "\033[1;35m",
|
||||
.enabled = 1, .loglevel = LOGL_NOTICE,
|
||||
.enabled = 1, .loglevel = LOGL_INFO,
|
||||
},
|
||||
[DOML] = {
|
||||
.name = "DOML",
|
||||
|
@ -69,7 +69,7 @@ static struct log_info_cat bts_log_info_cat[] = {
|
|||
[DL1C] = {
|
||||
.name = "DL1C",
|
||||
.description = "Layer 1",
|
||||
.loglevel = LOGL_DEBUG,
|
||||
.loglevel = LOGL_INFO,
|
||||
.enabled = 1,
|
||||
},
|
||||
[DL1P] = {
|
||||
|
@ -107,15 +107,11 @@ const struct log_info bts_log_info = {
|
|||
.num_cat = ARRAY_SIZE(bts_log_info_cat),
|
||||
};
|
||||
|
||||
#define DEFAULT_MASK "DL1C:DOML:DRSL:DPAG:DMEAS"
|
||||
|
||||
int bts_log_init(const char *category_mask)
|
||||
{
|
||||
if (!category_mask)
|
||||
category_mask = DEFAULT_MASK;
|
||||
|
||||
osmo_init_logging(&bts_log_info);
|
||||
|
||||
if (category_mask)
|
||||
log_parse_category_mask(osmo_stderr_target, category_mask);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -310,7 +310,7 @@ int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause)
|
|||
/* add cause */
|
||||
msgb_tv_put(msg, NM_ATT_NACK_CAUSES, cause);
|
||||
} else {
|
||||
LOGP(DOML, LOGL_NOTICE, "Sending FOM ACK.\n");
|
||||
LOGP(DOML, LOGL_DEBUG, "Sending FOM ACK.\n");
|
||||
foh->msg_type++; /* ack */
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@ static int oml_rx_set_radio_attr(struct gsm_bts_trx *trx, struct msgb *msg)
|
|||
/* 9.4.47 RF Max Power Reduction */
|
||||
if (TLVP_PRESENT(&tp, NM_ATT_RF_MAXPOWR_R)) {
|
||||
trx->max_power_red = *TLVP_VAL(&tp, NM_ATT_RF_MAXPOWR_R);
|
||||
LOGP(DOML, LOGL_INFO, " RF Max Power Reduction = %d\n", trx->max_power_red);
|
||||
LOGP(DOML, LOGL_INFO, "Set RF Max Power Reduction = %d\n", trx->max_power_red);
|
||||
}
|
||||
/* 9.4.5 ARFCN List */
|
||||
#if 0
|
||||
|
@ -634,7 +634,8 @@ static int oml_rx_set_chan_attr(struct gsm_bts_trx_ts *ts, struct msgb *msg)
|
|||
/* If there is no TSC specified, use the BCC */
|
||||
ts->tsc = bts->bsic & 0x3;
|
||||
}
|
||||
DEBUGP(DOML, "TS %u, settig TSC = %u\n", ts->nr, ts->tsc);
|
||||
LOGP(DOML, LOGL_INFO, "%s SET CHAN ATTR (TSC = %u)\n",
|
||||
gsm_abis_mo_name(&ts->mo), ts->tsc);
|
||||
|
||||
/* call into BTS driver to apply new attributes to hardware */
|
||||
return bts_model_apply_oml(bts, msg, tp_merged, ts);
|
||||
|
@ -773,8 +774,6 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts_trx *trx, struct msgb *msg,
|
|||
|
||||
uint8_t stream_id = 0;
|
||||
|
||||
DEBUGP(DOML, "Rx IPA RSL CONNECT ");
|
||||
|
||||
if (TLVP_PRESENT(tp, NM_ATT_IPACC_DST_IP)) {
|
||||
const uint8_t *ptr = TLVP_VAL(tp, NM_ATT_IPACC_DST_IP);
|
||||
ip = ntohl(*(uint32_t *)ptr);
|
||||
|
@ -788,8 +787,8 @@ static int rx_oml_ipa_rsl_connect(struct gsm_bts_trx *trx, struct msgb *msg,
|
|||
}
|
||||
|
||||
in.s_addr = htonl(ip);
|
||||
DEBUGPC(DOML, "IP=%s PORT=%u STREAM=0x%02x\n", inet_ntoa(in),
|
||||
port, stream_id);
|
||||
LOGP(DOML, LOGL_INFO, "Rx IPA RSL CONNECT IP=%s PORT=%u STREAM=0x%02x\n",
|
||||
inet_ntoa(in), port, stream_id);
|
||||
|
||||
if (!trx->rsl_link) {
|
||||
struct ipabis_link *rsl_link = talloc_zero(trx, struct ipabis_link);
|
||||
|
@ -816,8 +815,6 @@ static int down_mom(struct gsm_bts *bts, struct msgb *msg)
|
|||
struct tlv_parsed tp;
|
||||
int ret;
|
||||
|
||||
DEBUGP(DOML, "Manufacturer OML message\n");
|
||||
|
||||
if (msgb_l2len(msg) < sizeof(*foh)) {
|
||||
LOGP(DOML, LOGL_NOTICE, "Manufacturer O&M message too short\n");
|
||||
return -EIO;
|
||||
|
@ -843,7 +840,7 @@ static int down_mom(struct gsm_bts *bts, struct msgb *msg)
|
|||
}
|
||||
|
||||
abis_nm_debugp_foh(DOML, foh);
|
||||
DEBUGPC(DOML, "IPACCESS(0x%02x): ", foh->msg_type);
|
||||
DEBUGPC(DOML, "Rx IPACCESS(0x%02x): ", foh->msg_type);
|
||||
|
||||
switch (foh->msg_type) {
|
||||
case NM_MT_IPACC_RSL_CONNECT:
|
||||
|
|
|
@ -100,7 +100,7 @@ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg,
|
|||
if (is_system_prim == 0) {
|
||||
GsmL1_Prim_t *l1p = msgb_l1prim(msg);
|
||||
|
||||
LOGP(DL1C, LOGL_DEBUG, "Tx L1 prim %s\n",
|
||||
LOGP(DL1P, LOGL_INFO, "Tx L1 prim %s\n",
|
||||
get_value_string(femtobts_l1prim_names, l1p->id));
|
||||
|
||||
if (femtobts_l1prim_type[l1p->id] != L1P_T_REQ) {
|
||||
|
@ -116,7 +116,7 @@ int l1if_req_compl(struct femtol1_hdl *fl1h, struct msgb *msg,
|
|||
} else {
|
||||
FemtoBts_Prim_t *sysp = msgb_sysprim(msg);
|
||||
|
||||
LOGP(DL1C, LOGL_DEBUG, "Tx SYS prim %s\n",
|
||||
LOGP(DL1C, LOGL_INFO, "Tx SYS prim %s\n",
|
||||
get_value_string(femtobts_sysprim_names, sysp->id));
|
||||
|
||||
if (femtobts_sysprim_type[sysp->id] != L1P_T_REQ) {
|
||||
|
|
|
@ -359,7 +359,7 @@ static int lchan_act_compl_cb(struct msgb *l1_msg, void *data)
|
|||
GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg);
|
||||
GsmL1_MphActivateCnf_t *ic = &l1p->u.mphActivateCnf;
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s MPH-ACTIVATE.conf\n", gsm_lchan_name(lchan));
|
||||
LOGP(DL1C, LOGL_INFO, "%s MPH-ACTIVATE.conf\n", gsm_lchan_name(lchan));
|
||||
|
||||
if (ic->status == GsmL1_Status_Success) {
|
||||
DEBUGP(DL1C, "Successful activation of L1 SAPI %s on TS %u\n",
|
||||
|
@ -458,7 +458,7 @@ int lchan_activate(struct gsm_lchan *lchan)
|
|||
break;
|
||||
}
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s MPH-ACTIVATE.req (hL2=0x%08x)\n",
|
||||
LOGP(DL1C, LOGL_INFO, "%s MPH-ACTIVATE.req (hL2=0x%08x)\n",
|
||||
gsm_lchan_name(lchan), act_req->hLayer2);
|
||||
|
||||
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
|
||||
|
@ -478,7 +478,9 @@ static int lchan_deact_compl_cb(struct msgb *l1_msg, void *data)
|
|||
GsmL1_Prim_t *l1p = msgb_l1prim(l1_msg);
|
||||
GsmL1_MphDeactivateCnf_t *ic = &l1p->u.mphDeactivateCnf;
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s MPH-DEACTIVATE.conf\n", gsm_lchan_name(lchan));
|
||||
LOGP(DL1C, LOGL_INFO, "%s MPH-DEACTIVATE.conf (%s)\n",
|
||||
gsm_lchan_name(lchan),
|
||||
get_value_string(femtobts_l1sapi_names, ic->sapi));
|
||||
|
||||
if (ic->status == GsmL1_Status_Success) {
|
||||
DEBUGP(DL1C, "Successful deactivation of L1 SAPI %s on TS %u\n",
|
||||
|
@ -521,8 +523,9 @@ int lchan_deactivate(struct gsm_lchan *lchan)
|
|||
deact_req->dir = s4l->sapis[i].dir;
|
||||
deact_req->sapi = s4l->sapis[i].sapi;
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s MPH-DEACTIVATE.req\n",
|
||||
gsm_lchan_name(lchan));
|
||||
LOGP(DL1C, LOGL_INFO, "%s MPH-DEACTIVATE.req (%s)\n",
|
||||
gsm_lchan_name(lchan),
|
||||
get_value_string(femtobts_l1sapi_names, deact_req->sapi));
|
||||
|
||||
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
|
||||
l1if_req_compl(fl1h, msg, 0, lchan_deact_compl_cb, lchan);
|
||||
|
@ -545,7 +548,7 @@ int lchan_deactivate_sacch(struct gsm_lchan *lchan)
|
|||
deact_req->dir = DIR_BOTH;
|
||||
deact_req->sapi = GsmL1_Sapi_Sacch;
|
||||
|
||||
LOGP(DL1C, LOGL_NOTICE, "%s SACCH MPH-DEACTIVATE.req\n",
|
||||
LOGP(DL1C, LOGL_INFO, "%s MPH-DEACTIVATE.req (SACCH)\n",
|
||||
gsm_lchan_name(lchan));
|
||||
|
||||
/* send the primitive for all GsmL1_Sapi_* that match the LCHAN */
|
||||
|
|
Loading…
Reference in New Issue