[pbs-devel] [PATCH proxmox-backup] log: retrieve `ReaderEnvironment` debug flag from tracing

Christian Ebner c.ebner at proxmox.com
Tue Jul 16 10:38:26 CEST 2024


On 7/16/24 10:21, Christian Ebner wrote:
> 
> This is indeed a bit odd: The fact that the client can set the `debug` 
> flag when upgrading to the backup protocol, but cannot and should not 
> control the filter level makes this a bit strange.
> 
> So I would suggest to rename this method to something like 
> `client_debug` (or something better fitting?) an instead of calling the 
> `info` macro directly, call `self.log` instead if `self.debug` is set. 
> By this, it should at least be a bit more clear what is going on and one 
> cannot accidentally loose these debug messages as the same codepath is 
> then used for generating the event.
> 
Forgot to mention that by having a `debug` and a `client_debug` method, 
it would also be possible to differentiate log events generated by 
client request and ones only by level set for the server.





More information about the pbs-devel mailing list