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

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Dec 1 12:13:45 CET 2023


On Fri, Dec 01, 2023 at 10:56:47AM +0100, Lukas Wagner wrote:
> Hello,
> I'm currently evaluating how this crate could be used from the
> proxmox-perl-rs bindings.
> 
> The status quo there is that we initialize an envlogger, but that leads to
> the problem that logs are only visible for tasks, since envlogger does log
> to stdout (or was it stderr?).
> To differentiate between 'daemon context' and 'fork worker context' we
> obviously cannot rely on a tokio task-local var there.

I'm not convinced we'll be able to keep tokio out of there for long -
if only to block_on some futures via a current_thread runtime.

> Maybe it would make sense to have an alternative mode (gated via
> feature-flags) with a static flag, which is then set in
> RestEnvironment::fork_worker via a setter?

Sure. This can of course also be a follow up (I haven't looked over
this version yet).

> The dependency on tokio should then also be feature-gated, since we don't
> want to have to pull in tokio as a dep for proxmox-perl-rs yet.

👍




More information about the pbs-devel mailing list