From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] app/testpmd: change log level at run time Date: Sat, 20 Jan 2018 15:29:53 +0100 Message-ID: <6232706.WoQsgU34jB@xps> References: <1516400350-96747-1-git-send-email-elza.mathew@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, wenzhuo.lu@intel.com, jingjing.wu@intel.com To: Elza Mathew Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 12B2AA568 for ; Sat, 20 Jan 2018 15:30:30 +0100 (CET) In-Reply-To: <1516400350-96747-1-git-send-email-elza.mathew@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 19/01/2018 23:19, Elza Mathew: > @@ -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.