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 0A92873F40 for ; Tue, 31 May 2022 10:44:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 01FBF6598 for ; Tue, 31 May 2022 10:44:29 +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 id 85040658F for ; Tue, 31 May 2022 10:44:28 +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 5984D422A1 for ; Tue, 31 May 2022 10:44:28 +0200 (CEST) Date: Tue, 31 May 2022 10:44:27 +0200 From: Wolfgang Bumiller To: Hannes Laimer Cc: pbs-devel@lists.proxmox.com Message-ID: <20220531084427.ce26vuaztp2nxpk3@casey.proxmox.com> References: <20220510090158.33504-1-h.laimer@proxmox.com> <20220510090158.33504-5-h.laimer@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220510090158.33504-5-h.laimer@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.327 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH proxmox-backup rebased 3/9] pbs-datastore: replace print with log macro 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: Tue, 31 May 2022 08:44:29 -0000 On Tue, May 10, 2022 at 09:01:52AM +0000, Hannes Laimer wrote: > --- a/pbs-datastore/src/fixed_index.rs > +++ b/pbs-datastore/src/fixed_index.rs > @@ -51,7 +51,7 @@ unsafe impl Sync for FixedIndexReader {} > impl Drop for FixedIndexReader { > fn drop(&mut self) { > if let Err(err) = self.unmap() { > - eprintln!("Unable to unmap file - {}", err); > + log::error!("Unable to unmap file - {}", err); > } > } > } > @@ -144,16 +144,16 @@ impl FixedIndexReader { > } > > pub fn print_info(&self) { AFAICT this entire function is unused and could just be removed (as a separate patch) > - println!("Size: {}", self.size); > - println!("ChunkSize: {}", self.chunk_size); > + log::info!("Size: {}", self.size); > + log::info!("ChunkSize: {}", self.chunk_size); > > let mut ctime_str = self.ctime.to_string(); > if let Ok(s) = proxmox_time::strftime_local("%c", self.ctime) { > ctime_str = s; > } > > - println!("CTime: {}", ctime_str); > - println!("UUID: {:?}", self.uuid); > + log::info!("CTime: {}", ctime_str); > + log::info!("UUID: {:?}", self.uuid); > } > } >