ConfD User Community

Debug commands in ConfD


#1

Hi Team,

How can we implement debug commands via ConfD CLI for any particular service, any previous references or examples will help.
For example, If a user wants to turn ON crypto related debug commands and later turn them OFF when debugging is done

“singlebox# debug crypto session” and “singlebox#no debug crypto session”

Thanks in advance!


#2

In order to add the debug commands as you have described, you can refer to the following sections of the ConfD 6.2 User Guide regarding how to add CLI commands:

Chapter 16.21.2: Adding new commands

Chapter 16.24: User defined commands in C using C-API

Chapter 16.25: User defined commands as shell scripts

In addition, you can also refer to the cli_command and c_cli examples in the cli folder of the examples.confd directory that is available in the ConfD Premium release.


#3

If we want to send the “debug message” string to the cli, which way do you suggest? maapi_cli_printf 、maapi_user_message or some other function? the print efficiency must be taken into account , since the “debug message” is too many and frequently.