From 3c5612f82b29a8c57e88499d6cc7cf334d66d6cb Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 11 Jul 2018 19:53:39 +0200 Subject: create separate logging categories for lchan,ts,as FSMs Change-Id: Ie889b8860a4a63c7c22ef65025f690d64cd7330c --- include/osmocom/bsc/debug.h | 3 +++ src/osmo-bsc/assignment_fsm.c | 2 +- src/osmo-bsc/lchan_fsm.c | 2 +- src/osmo-bsc/lchan_rtp_fsm.c | 2 +- src/osmo-bsc/osmo_bsc_main.c | 18 ++++++++++++++++++ src/osmo-bsc/timeslot_fsm.c | 2 +- tests/handover/handover_test.c | 18 ++++++++++++++++++ 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/include/osmocom/bsc/debug.h b/include/osmocom/bsc/debug.h index 1133bf6f6..e78ba59a8 100644 --- a/include/osmocom/bsc/debug.h +++ b/include/osmocom/bsc/debug.h @@ -24,5 +24,8 @@ enum { DFILTER, DPCU, DLCLS, + DCHAN, + DTS, + DAS, Debug_LastEntry, }; diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index a2b17463f..e37ec9cb0 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -642,7 +642,7 @@ static struct osmo_fsm assignment_fsm = { .name = "assignment", .states = assignment_fsm_states, .num_states = ARRAY_SIZE(assignment_fsm_states), - .log_subsys = DRSL, + .log_subsys = DAS, .event_names = assignment_fsm_event_names, .allstate_action = assignment_fsm_allstate_action, .allstate_event_mask = 0 diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 940afe8de..9c22bded4 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -1275,7 +1275,7 @@ static struct osmo_fsm lchan_fsm = { .name = "lchan", .states = lchan_fsm_states, .num_states = ARRAY_SIZE(lchan_fsm_states), - .log_subsys = DRSL, + .log_subsys = DCHAN, .event_names = lchan_fsm_event_names, .allstate_action = lchan_fsm_allstate_action, .allstate_event_mask = 0 diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 3530b8a72..f7efc1ba8 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -736,7 +736,7 @@ static struct osmo_fsm lchan_rtp_fsm = { .name = "lchan_rtp", .states = lchan_rtp_fsm_states, .num_states = ARRAY_SIZE(lchan_rtp_fsm_states), - .log_subsys = DRSL, + .log_subsys = DCHAN, .event_names = lchan_rtp_fsm_event_names, .timer_cb = lchan_rtp_fsm_timer_cb, .cleanup = lchan_rtp_fsm_cleanup, diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c index 8dc90986e..37e8665dd 100644 --- a/src/osmo-bsc/osmo_bsc_main.c +++ b/src/osmo-bsc/osmo_bsc_main.c @@ -679,6 +679,24 @@ static const struct log_info_cat osmo_bsc_categories[] = { .color = "\033[1;35m", .enabled = 1, .loglevel = LOGL_NOTICE, }, + [DCHAN] = { + .name = "DCHAN", + .description = "lchan FSM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DTS] = { + .name = "DTS", + .description = "timeslot FSM", + .color = "\033[1;31m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, + [DAS] = { + .name = "DAS", + .description = "assignment FSM", + .color = "\033[1;33m", + .enabled = 1, .loglevel = LOGL_NOTICE, + }, [DNM] = { .name = "DNM", .description = "A-bis Network Management / O&M (NM/OML)", diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c index 21de2fa67..56b335773 100644 --- a/src/osmo-bsc/timeslot_fsm.c +++ b/src/osmo-bsc/timeslot_fsm.c @@ -834,7 +834,7 @@ static struct osmo_fsm ts_fsm = { .states = ts_fsm_states, .num_states = ARRAY_SIZE(ts_fsm_states), .timer_cb = ts_fsm_timer_cb, - .log_subsys = DRSL, + .log_subsys = DTS, .event_names = ts_fsm_event_names, .allstate_event_mask = 0 | S(TS_EV_OML_DOWN) diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 92c002dcc..a9627772a 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1357,6 +1357,24 @@ static const struct log_info_cat log_categories[] = { .description = "Mobile Switching Center", .enabled = 1, .loglevel = LOGL_DEBUG, }, + [DCHAN] = { + .name = "DCHAN", + .description = "lchan FSM", + .color = "\033[1;32m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, + [DTS] = { + .name = "DTS", + .description = "timeslot FSM", + .color = "\033[1;31m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, + [DAS] = { + .name = "DAS", + .description = "assignment FSM", + .color = "\033[1;33m", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, }; const struct log_info log_info = { -- cgit v1.2.3