[pbs-devel] [PATCH proxmox-backup rebased 3/9] pbs-datastore: replace print with log macro

Wolfgang Bumiller w.bumiller at proxmox.com
Tue May 31 10:44:27 CEST 2022


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);
>      }
>  }
>  





More information about the pbs-devel mailing list