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 0BD8742C22; Tue, 13 Jun 2023 17:21:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D941940C35; Tue, 13 Jun 2023 17:21:30 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id DDF0240A8A for ; Tue, 13 Jun 2023 17:21:28 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1b3b5a5134dso18520375ad.2 for ; Tue, 13 Jun 2023 08:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1686669688; x=1689261688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=LAlfxXIbHyNP6sO1VC89Z7kYDr/lSD7vkv7uoK0edvQ=; b=YLPizl6nUurPmRY0Uw/Fgu9vvk/Y2Z198/DZJE1nHiCXkaVU/jxSnU7OodRQ82sjt7 DAgMTWzEVVDAqpKqoiob+npSdjtyPsGzRifxJ3qKDpL3xzp6J7+zsmQvB0COuTyqglPc zLE5zx3gG9Yy2bRSzOWYnIW9XK1ISQ1u1njlbbFSuCzeEDPbVcs57iJltxTPAlhpCyIh n7UQyEq2Fq51bh5SfdfcsqSJ7qfaRcEmXCfC5Bu+qVGPsQp60FSp8Qp23Cv+2y7OIFE5 AJo8J4VFVfdukfK2AQgEx5MirbbVu6tbQMAeizNDO7DrlQMCVFXxhFZLh07V2EekvoHK fHVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686669688; x=1689261688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LAlfxXIbHyNP6sO1VC89Z7kYDr/lSD7vkv7uoK0edvQ=; b=TBSFiEf/L+mi/GXxVi54rK8K9xEIu+l1yH+KQT0SLqLNJhffJfY/6qYMOij1+z2qJ0 rWGMSf8UCGuluaDYtf+ncIPVfwexAqD2F4eYGjX3gd0qVX0tEXZTdC9jNEr30CxWxCLH Q/XFBStdrOJUBwbrTcIBxlwBsJtwN1Zv0bdE9eyyw+3F6nuUuPoTjhEqZd2zGEvqp0wV 0XUo4wr6ex5IaBJYplz8xj+MuW1Eo0A2i4hHK3tSHEKajATWes8Cf6vvLcER5IeQQ5fS HCAUMPfY1j0zdQK3wHUXRe1zun6QlurpaVqPim46zirIfhqwXzJM1Mvfj0KsxDoXR2C/ yesA== X-Gm-Message-State: AC+VfDwcnBun92pBj5ERNQsZ8yonxo/MA7zkEv6Fd/CzYvDGwmB1BrZR RvZYVwlkoZDORD4HPYG9mzZGKQ== X-Google-Smtp-Source: ACHHUZ7BAYADc7lcYkdfgDvpID+1gPX1r/vFj8hJ/ecuBQE77i8yYrxs1sNUEjLGdSgztCT91szUjA== X-Received: by 2002:a17:902:a601:b0:1b3:e6ba:1573 with SMTP id u1-20020a170902a60100b001b3e6ba1573mr2056171plq.6.1686669687744; Tue, 13 Jun 2023 08:21:27 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id jn13-20020a170903050d00b001b1f991a4e2sm10440204plb.20.2023.06.13.08.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 08:21:27 -0700 (PDT) Date: Tue, 13 Jun 2023 08:21:25 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Subject: Re: [PATCH 2/2] doc/contributing: guidelines for logging, tracing and telemetry Message-ID: <20230613082125.673402fe@hermes.local> In-Reply-To: <20230613143355.77914-3-bruce.richardson@intel.com> References: <20230613143355.77914-1-bruce.richardson@intel.com> <20230613143355.77914-3-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Tue, 13 Jun 2023 15:33:55 +0100 Bruce Richardson wrote: > +Below are some guidelines for when each should be used: > + > +* For reporting error conditions, or other abnormal runtime issues, *logging* should be used. > + Depending on the severity of the issue, the appropriate log level, for example, > + ``ERROR``, ``WARNING`` or ``NOTICE``, should be used. > +* In general, it is not recommended that the DPDK logging functions should be used for debugging. > + Although the ``DEBUG`` log level may be used in components, it should only be used sparingly, > + and the *tracing* functionality used instead. > + More specifically: > + > + * for cases where a path through the code is only likely to be taken once, > + for example, initialization code, either *logging* at ``DEBUG`` level or *tracing* may be used - > + though tracing is preferred. > + * where a path is to be taken multiple times within a short timeframe, for example, > + datapath or regular control plane code, *tracing* should be used. When a new feature, bus or device type is added it *must* not log when not present. No new messages for existing users please.