summaryrefslogtreecommitdiffstats
path: root/mgmtd/mgmt.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-26 15:54:54 +0100
committerMark Stapp <mjs@cisco.com>2024-08-27 15:53:02 +0200
commit5dac6961540422a1ca139fae8c5ea9e5a437c4ba (patch)
tree3ff27afc04b9605f832c747b82449b58d5aa5455 /mgmtd/mgmt.c
parentpathd: rework debugs (diff)
downloadfrr-5dac6961540422a1ca139fae8c5ea9e5a437c4ba.tar.xz
frr-5dac6961540422a1ca139fae8c5ea9e5a437c4ba.zip
lib: rework debug init
The debug library allows to register a `debug_set_all` callback which should enable all debugs in a daemon. This callback is implemented exactly the same in each daemon. Instead of duplicating the code, rework the lib to allow registration of each debug type, and implement the common code only once in the lib. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'mgmtd/mgmt.c')
-rw-r--r--mgmtd/mgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mgmtd/mgmt.c b/mgmtd/mgmt.c
index fe0357e7e..5c647551f 100644
--- a/mgmtd/mgmt.c
+++ b/mgmtd/mgmt.c
@@ -39,6 +39,10 @@ void mgmt_master_init(struct event_loop *master, const int buffer_size)
void mgmt_init(void)
{
+ debug_install(&mgmt_debug_be);
+ debug_install(&mgmt_debug_ds);
+ debug_install(&mgmt_debug_fe);
+ debug_install(&mgmt_debug_txn);
/* Initialize datastores */
mgmt_ds_init(mm);