From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B733941F45; Wed, 26 Jun 2024 19:10:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D5FA40608; Wed, 26 Jun 2024 19:10:52 +0200 (CEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mails.dpdk.org (Postfix) with ESMTP id 75F30402CF; Wed, 26 Jun 2024 19:10:50 +0200 (CEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C7E4140006; Wed, 26 Jun 2024 17:10:49 +0000 (UTC) Message-ID: Date: Wed, 26 Jun 2024 19:10:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: i.maximets@ovn.org, stable@dpdk.org, Anoob Joseph Subject: Re: [PATCH] doc: enhance the global log level documentation To: David Marchand , dev@dpdk.org References: <20240626150926.1918948-1-david.marchand@redhat.com> Content-Language: en-US From: Ilya Maximets Autocrypt: addr=i.maximets@ovn.org; keydata= xsFNBF77bOMBEADVZQ4iajIECGfH3hpQMQjhIQlyKX4hIB3OccKl5XvB/JqVPJWuZQRuqNQG /B70MP6km95KnWLZ4H1/5YOJK2l7VN7nO+tyF+I+srcKq8Ai6S3vyiP9zPCrZkYvhqChNOCF pNqdWBEmTvLZeVPmfdrjmzCLXVLi5De9HpIZQFg/Ztgj1AZENNQjYjtDdObMHuJQNJ6ubPIW cvOOn4WBr8NsP4a2OuHSTdVyAJwcDhu+WrS/Bj3KlQXIdPv3Zm5x9u/56NmCn1tSkLrEgi0i /nJNeH5QhPdYGtNzPixKgPmCKz54/LDxU61AmBvyRve+U80ukS+5vWk8zvnCGvL0ms7kx5sA tETpbKEV3d7CB3sQEym8B8gl0Ux9KzGp5lbhxxO995KWzZWWokVUcevGBKsAx4a/C0wTVOpP FbQsq6xEpTKBZwlCpxyJ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1Xsg4dYv dYzTNu19FRpfc+nVRdVnOto8won1SHGgYSVJA+QPv1x8lMYqKESOHAFE/DJJKU8MRkCeSfqs izFVqTxTk3VXOCMUR4t2cbZ9E7Qb/ZZigmmSgilSrOPgDO5TtT811SzheAN0PvgT+L1Gsztc Q3BvfofFv3OLF778JyVfpXRHsn9rFqxG/QYWMqJWi+vdPJ5RhDl1QUEFyH7ok/ZY60/85FW3 o9OQwoMf2+pKNG3J+EMuU4g4ZHGzxI0isyww7PpEHx6sxFEvMhsOp7qnjPsQUcnGIIiqKlTj H7i86580VndsKrRK99zJrm4s9Tg/7OFP1SpVvNvSM4TRXSzVF25WVfLgeloN1yHC5Wsqk33X XNtNovqA0TLFjhfyyetBsIOgpGakgBNieC9GnY7tC3AG+BqG5jnVuGqSTO+iM/d+lsoa+w== In-Reply-To: <20240626150926.1918948-1-david.marchand@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: i.maximets@ovn.org X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/26/24 17:09, David Marchand wrote: > The current documentation is non intuitive in that the global log level > can be understood as being a single knob controlling all components > logs. > On the contrary, all the global log level is for is to reduce verbosity > globally. > > Remove examples of setting --log-level=8|debug, which is a noop. > > Cc: stable@dpdk.org > > Signed-off-by: David Marchand > --- > doc/guides/cryptodevs/octeontx.rst | 2 +- > doc/guides/prog_guide/log_lib.rst | 10 ++++++---- > 2 files changed, 7 insertions(+), 5 deletions(-) Thanks, David! Though I still find this part of the documentation extremely confusing. > > diff --git a/doc/guides/cryptodevs/octeontx.rst b/doc/guides/cryptodevs/octeontx.rst > index a39f3f3d02..97e13514f3 100644 > --- a/doc/guides/cryptodevs/octeontx.rst > +++ b/doc/guides/cryptodevs/octeontx.rst > @@ -114,7 +114,7 @@ OCTEON TX crypto PMD. > > .. code-block:: console > > - ./build/ipsec-secgw --log-level=8 -c 0xff -- -P -p 0x3 -u 0x2 --config > + ./build/ipsec-secgw -c 0xff -- -P -p 0x3 -u 0x2 --config > "(1,0,0),(0,0,0)" -f ep1.cfg > > Testing > diff --git a/doc/guides/prog_guide/log_lib.rst b/doc/guides/prog_guide/log_lib.rst > index ff9d1b54a2..965b7e9961 100644 > --- a/doc/guides/prog_guide/log_lib.rst > +++ b/doc/guides/prog_guide/log_lib.rst > @@ -32,18 +32,20 @@ or by the user passing the ``--log-level`` parameter to the EAL via the applicat > Setting Global Log Level > ~~~~~~~~~~~~~~~~~~~~~~~~ > > -To adjust the global log level for an application, > -just pass a numeric level or a level name to the ``--log-level`` EAL parameter. > +By default, the global log level is set to ``RTE_LOG_DEBUG``. This reads as I'll see debug logs from every component unless I turn them off. Which is not true. The main issue is that this doc doesn't define what 'global log level' means. > + > +To reduce the verbosity of an application globally, > +adjust the global log level by passing a numeric level or a level name to the ``--log-level`` EAL parameter. > For example:: > > /path/to/app --log-level=error > > - /path/to/app --log-level=debug > - > /path/to/app --log-level=5 # warning > > Within an application, the log level can be similarly set using the ``rte_log_set_global_level`` API. > > +For setting per component log levels, see below. > + > Setting Log Level for a Component > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > I'd suggest to remove the 'Setting Global Log Level' section entirely. Rename the 'Setting Log Level for a Component' into 'Setting Log Levels' and restructure it in a way: To set the log level for a particular component, use: --log-level=component:level <...> For example, to see warnings and higher errors from <...> use <...>. To set the log level for multiple components with wildcard match, use: --log-level=my_compon*:level <...> For example, to see warnings and higher errors from all PMDs use <...>. To see all the messages including debug logs from all PMDs use <...> To set the desired log level for everything at once, use: --log-level=*:level Also, the following syntax can be used to *decrease* log level globally: --log-level=level # works only for decreasing current verbosity What do you think? (Some wording may need changes obviously. For example, the doc says the more critical levels are 'above' because they have 'higher importance', but numbers are going the opposite direction. So words like 'reduce' or 'increase' are hard to interpret in this context.) Best regards, Ilya Maximets.