[pbs-devel] [PATCH proxmox 1/2] proxmox-log: added tracing infra

Lukas Wagner l.wagner at proxmox.com
Fri Dec 1 15:48:21 CET 2023



On 12/1/23 10:56, Lukas Wagner wrote:
>> +
>> +        let result = LOGGER.try_with(|logger| {
>> +            log_to_file(&mut logger.borrow_mut(), level, &buf);
>> +        });
>> +        if result.is_err() || *level == Level::ERROR {
>                                                       ^
> Shouldn't this be configurable?
> Or, alternatively would it make sense of drop this comparison and only 
> rely on the env var (e.g. PBS_LOG)?
> 

Argh, misread this line before, sorry. I somehow read this as 'only 
errors should ever got to syslog', but in reality it's 'if task and 
error, it goes to both, syslog and stdout'.

So it's fine as is, IMO.

-- 
- Lukas




More information about the pbs-devel mailing list