Change in osmo-bsc[master]: create separate logging categories for lchan, ts, as FSMs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sat Jul 28 10:44:08 UTC 2018


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/10106 )

Change subject: create separate logging categories for lchan,ts,as FSMs
......................................................................

create separate logging categories for lchan,ts,as FSMs

Change-Id: Ie889b8860a4a63c7c22ef65025f690d64cd7330c
---
M include/osmocom/bsc/debug.h
M src/osmo-bsc/assignment_fsm.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/timeslot_fsm.c
M tests/handover/handover_test.c
7 files changed, 43 insertions(+), 4 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/bsc/debug.h b/include/osmocom/bsc/debug.h
index 1133bf6..e78ba59 100644
--- a/include/osmocom/bsc/debug.h
+++ b/include/osmocom/bsc/debug.h
@@ -24,5 +24,8 @@
 	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 a2b1746..e37ec9c 100644
--- a/src/osmo-bsc/assignment_fsm.c
+++ b/src/osmo-bsc/assignment_fsm.c
@@ -642,7 +642,7 @@
 	.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 940afe8..9c22bde 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -1275,7 +1275,7 @@
 	.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 3530b8a..f7efc1b 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -736,7 +736,7 @@
 	.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 8dc9098..37e8665 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -679,6 +679,24 @@
 		.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 21de2fa..56b3357 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -834,7 +834,7 @@
 	.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 92c002d..a962777 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -1357,6 +1357,24 @@
 		.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 = {

-- 
To view, visit https://gerrit.osmocom.org/10106
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie889b8860a4a63c7c22ef65025f690d64cd7330c
Gerrit-Change-Number: 10106
Gerrit-PatchSet: 9
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180728/bd1bb267/attachment.htm>


More information about the gerrit-log mailing list