Re: [PATCH] app/testpmd: change log level at run time
From: Thomas Monjalon <hidden>
Date: 2018-01-20 14:30:30
19/01/2018 23:19, Elza Mathew:
quoted hunk ↗ jump to hunk
@@ -16026,6 +16078,7 @@ struct cmd_cmdfile_result { (cmdline_parse_inst_t *)&cmd_set_link_down, (cmdline_parse_inst_t *)&cmd_reset, (cmdline_parse_inst_t *)&cmd_set_numbers, + (cmdline_parse_inst_t *)&cmd_set_log, (cmdline_parse_inst_t *)&cmd_set_txpkts, (cmdline_parse_inst_t *)&cmd_set_txsplit, (cmdline_parse_inst_t *)&cmd_set_fwd_list,diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index d8c9ef0..3c55eb6 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst@@ -505,6 +505,25 @@ When retry is enabled, the transmit delay time and number of retries can also be testpmd> set burst tx delay (microseconds) retry (num) +set log +~~~~~~~ + +Set the log level for a log type:: + + testpmd> set log global|(type) (level) + +Where: + +* ``type`` is the log name. + +* ``level`` is the log level. + +For example, to change the global log level:: + testpmd> set log global (level) + +Regexes can also be used for type. To change log level of user1, user2 and user3:: + testpmd> set log user[1-3] (level) + set txpkts ~~~~~~~~~~
I know that testpmd code and doc are a bit messy, but maybe we can find a better place for this command in the doc and in the code. As it is very generic, I think it should be one of the first commands.