[pdm-devel] [PATCH datacenter-manager 2/3] fix #7179: cli: admin: expose acme commands
Lukas Wagner
l.wagner at proxmox.com
Tue Jan 27 13:09:37 CET 2026
On Tue Jan 27, 2026 at 12:14 PM CET, Shan Shaji wrote:
>>> @@ -21,13 +22,17 @@ async fn run() -> Result<(), Error> {
>>> &pdm_api_types::AccessControlConfig,
>>> pdm_buildcfg::configdir!("/access"),
>>> )?;
>>> + proxmox_acme_api::init(pdm_buildcfg::configdir!("/acme"), false)?;
>>> +
>>> proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO)
>>> + .stderr_on_no_workertask()
>>> .stderr()
>>> .init()?;
>>
>> Doing this actually prints all messages logged outside a workertask
>> *twice*, since this adds two subscribers that will print to stdout.
>>
>> I think it would make more sense to:
>>
>> proxmox_log::Logger::from_env("PDM_LOG", proxmox_log::LevelFilter::INFO)
>> .tasklog_pbs()
>> .stderr()
>> .init()?;
>>
>> ... which should print *all* messages to stderr and messages from within
>> a task log will also be stored in the task log.
>
> or could we keep the `stderr_on_no_workertask()` and remove the
> `stderr`?
No, then you would not get any log output from any code that runs within
the worker, that would not be ideal.
Maybe check out the defintion of these builder methods in
proxmox-log/src/builder.rs, I think the doc comments makes the behavior
a bit more clear.
Since this is a CLI tool, I would say that every log message that is
produced in the code should go to stderr in any case, as this might
contain important information for interactive or scripted use cases - so
`.stderr()`.
As a bonus I think it's valuable to have logs of the worker tasks inside
the task logs as well, hence the `.tasklog_pbs()` (maybe we should
reconsider the name, this is not really PBS specific any more).
>
>> Maybe also ask Gabriel about these, he did a lot of work on logging.
>
> Will ask him about it. Thank You!
>
>> @Gabriel, would my proposal make sense here?
>>
More information about the pdm-devel
mailing list