[pbs-devel] [PATCH proxmox v5 2/4] enable tracing logger, remove task_log macros

Gabriel Goller g.goller at proxmox.com
Tue Jun 25 10:49:56 CEST 2024


Thanks for the review!

On 24.06.2024 13:09, Lukas Wagner wrote:
>2 nits inline
>
>On  2024-06-13 15:56, Gabriel Goller wrote:
>> diff --git a/proxmox-rest-server/src/worker_task.rs b/proxmox-rest-server/src/worker_task.rs
>> index 5bab4cdc..58537f54 100644
>> --- a/proxmox-rest-server/src/worker_task.rs
>> +++ b/proxmox-rest-server/src/worker_task.rs
>> @@ -1,3 +1,4 @@
>> +use std::cell::{Cell, RefCell};
>>  use std::collections::{HashMap, VecDeque};
>>  use std::fs::File;
>>  use std::io::{BufRead, BufReader, Read, Write};
>> @@ -12,21 +13,23 @@ use futures::*;
>>  use lazy_static::lazy_static;
>>  use nix::fcntl::OFlag;
>>  use once_cell::sync::OnceCell;
>> +use proxmox_log::{LOGGER, WARN_COUNTER};
>
>Nit: Order of imports, let's put this import to the other
>proxmox_* imports below

Fixed!

>> @@ -340,11 +346,9 @@ pub fn cleanup_old_tasks(worker: &dyn WorkerTaskContext, compressed: bool) -> Re
>>                  let file = match file {
>>                      Ok(file) => file,
>>                      Err(err) => {
>> -                        task_warn!(
>> -                            worker,
>> -                            "could not check some task log in '{:02X}': {}",
>> -                            i,
>> -                            err
>> +                        warn!(
>> +                            tasklog = true,
>> +                            "could not check some task log in '{:02X}': {}", i
>err
>
>Nit: You could inline these vars if you edit these lines any way.

Fixed! Also removed the 'tasklog = true' parameter, which we removed in
a previous version.





More information about the pbs-devel mailing list