From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8CEDD9C084 for ; Mon, 23 Oct 2023 11:09:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6C4B811371 for ; Mon, 23 Oct 2023 11:09:19 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 23 Oct 2023 11:09:18 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id AF295444D3 for ; Mon, 23 Oct 2023 11:09:18 +0200 (CEST) Message-ID: <0fd77836-896a-4017-9300-b74be824f346@proxmox.com> Date: Mon, 23 Oct 2023 11:09:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Dominik Csapak , Proxmox Backup Server development discussion References: <20231011140102.273423-1-g.goller@proxmox.com> <4e0de017-9fbf-4a5e-b735-62b955fe8a8b@proxmox.com> From: Gabriel Goller In-Reply-To: <4e0de017-9fbf-4a5e-b735-62b955fe8a8b@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.302 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pbs-devel] [RFC proxmox-backup 0/2] Tasklog rewrite with tracing X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2023 09:09:49 -0000 On 10/18/23 15:12, Dominik Csapak wrote: > hi, a high level comments on this series: > > you implemented a 'tasklog' = true filter, which is nice, but not > filter for the syslog > in general we'd want to land things either in the task log (preferred) > or in the syslog, > not in both (e.g. for some tasks this pollutes the syslog unnecessarily) > Ok, this should be easy, we just check in the `syslog_layer` if the `task_log` attribute is None in the Metadata. Like this we only log to task_log OR syslog. > so i'd like to see also a syslog = false (or syslog = true)  and maybe > some > functionality to enable/disable that for whole block (if that's even > possible?) As mentioned in the other patch, currently we can't inspect metadata values when enabling/ disabling a layer :/ . What do you mean exactly by 'disabling in a whole block'? We could enable/disable the filelog layer in specific rust modules (not so useful for us) or e.g, create a span on thread/task creation and then let all the logs in that span go to the task_log? The problem with that is that we would have to create an specific attribute to log to syslog while we are in a worker_task context (e.g. `info!(syslog = true, "to syslog")`) and it's not so clear anymore where we write (i.e. I'd have to look at the context to know if a `log::info!()` call writes to task_log or syslog). IMO having a explicit `tasklog` attribute on every event is good (The name is obviously debatable, we could choose something shorter, or create a macro `task_info!` to make it easier to use).