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 50723A034F; Tue, 23 Mar 2021 09:19:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C0EE64014D; Tue, 23 Mar 2021 09:19:42 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9C7DF40143 for ; Tue, 23 Mar 2021 09:19:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616487580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gvXY1yW9mBzDVMQbAX60oxOwh9OTkOa56LjFDaX4hIE=; b=Siq0Lnte14yhBWfD/2DUJDhzLve3ExOUC8DVkHLT/7wOmSV5+2zuFbtufxhwG+KbQ7inQP hWxYhgBpQWcXGcFfSkeubxBPblgcxozD3RRAU5e3eKfg9k/KPpFKz4yw4SanlwckNJgqEE kItxwlStK+wLu64/blUtbkNthaRTkG0= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-294-QDYR4o74NcW6wFRpdEcFkQ-1; Tue, 23 Mar 2021 04:19:39 -0400 X-MC-Unique: QDYR4o74NcW6wFRpdEcFkQ-1 Received: by mail-vk1-f198.google.com with SMTP id n196so224942vkn.23 for ; Tue, 23 Mar 2021 01:19:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gvXY1yW9mBzDVMQbAX60oxOwh9OTkOa56LjFDaX4hIE=; b=N86oiOAB0lx6R/CSyjH9uif/wrGvQRzh+4+z0ifvF8gJH/CtUgbuDiWCVaDjbYIzj0 pLlTG1w8WpP8wXAUi736nLItbIjXb/2UBBYLYCZiVn8IwWlhAVgj3I5RM1r413vom5y3 yDvYSslGVWMgJIticQa9HDBLO57o4+g8ZLEId3p2vEo2RZrujKanq/U2jS2A/Oo+q/Io 9+hWZBXtC3/jMyuOgWazxWlWIDPRHSDBbYOsvQXYyBJcMdMENk1Qc2nHPlgY8O2rK6cu KEMH2I/qrBdRUjTazwwUv9dzaC+iDTsjR4CGqAjLb8ikYL4f6dYdrTqYfi5aZ8JGp7WE 79ow== X-Gm-Message-State: AOAM533BZfgzyx4/Q6ILEp9XQdxME+YRvJ8LMhifEi7TU6WBeOcREDvE KPesazwiWOM/qBxP71mLrRlXlIvPOOW0fOXPbPWK/9c5sg5KqQ4F0Zwewr7if8t5lNISi5TKXPJ jxCHVyWjI4cNmRfiexug= X-Received: by 2002:a05:6102:ed4:: with SMTP id m20mr2262986vst.27.1616487578587; Tue, 23 Mar 2021 01:19:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyattts0h0OsdjytE/AHt4doch76TbeG7yyE86MK0Vkk+tAt9OBb1Nw7Z5SowpCoiNbpBDeDHojafflgw4sOhY= X-Received: by 2002:a05:6102:ed4:: with SMTP id m20mr2262979vst.27.1616487578293; Tue, 23 Mar 2021 01:19:38 -0700 (PDT) MIME-Version: 1.0 References: <20200626114751.22523-1-david.marchand@redhat.com> <1f3ca39a-1814-0b3a-39d2-445056a0352e@partner.samsung.com> In-Reply-To: <1f3ca39a-1814-0b3a-39d2-445056a0352e@partner.samsung.com> From: David Marchand Date: Tue, 23 Mar 2021 09:19:27 +0100 Message-ID: To: Lukasz Wojciechowski Cc: Andrew Rybchenko , dev , Ilya Maximets Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [RFC PATCH] log: track log level changes 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 Sender: "dev" Hello Lukasz, On Thu, Jul 9, 2020 at 2:16 AM Lukasz Wojciechowski wrote: > > > W dniu 26.06.2020 o 16:46, Andrew Rybchenko pisze: > > On 6/26/20 2:47 PM, David Marchand wrote: > >> Add a log message when changing log levels to be sure of which logtype > >> is enabled. > >> > > although I think there is one place that can be smoothed a bit. Every > newly registered type's loglevel is set to RTE_LOG_INFO in > __rte_log_register(), so: > * if new type is registered with rte_log_register_type_and_pick_level() > and level is set to INFO, nothing will be printed (as current is equal > to new level); > * any registration made with rte_log_register() won't be seen either as > there is no call to newly introduced function logtype_set_level(). > > How about additionally changing behavior so any registration will print > change from "disabled" (level=0) to new level: > * in case of rte_log_register_type_and_pick_level() to chosen level > * in case of rte_log_register() to default level which is "info" Sorry, I had forgotten about this rfc... reviving it as I am reviewing some log patch. Good idea, I will post a v1 with this. -- David Marchand