From: "Lukas Wagner" <l.wagner@proxmox.com>
To: "Shan Shaji" <s.shaji@proxmox.com>,
"Lukas Wagner" <l.wagner@proxmox.com>,
"Proxmox Datacenter Manager development discussion"
<pdm-devel@lists.proxmox.com>,
"Gabriel Goller" <g.goller@proxmox.com>
Subject: Re: [pdm-devel] [PATCH datacenter-manager 2/3] fix #7179: cli: admin: expose acme commands
Date: Tue, 27 Jan 2026 13:09:37 +0100 [thread overview]
Message-ID: <DFZCZPPUN05D.1E0OFNRPBXCJ2@proxmox.com> (raw)
In-Reply-To: <DFZBTLT0VMLY.3MR3NN30JSQ4C@proxmox.com>
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?
>>
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2026-01-27 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 17:29 [pdm-devel] [PATCH datacenter-manager 0/3] fix #7179: expose ACME commands inside admin CLI Shan Shaji
2026-01-23 17:29 ` [pdm-devel] [PATCH datacenter-manager 1/3] cli: admin: make cli handling async Shan Shaji
2026-01-27 9:17 ` Lukas Wagner
2026-01-27 11:27 ` Shan Shaji
2026-01-23 17:29 ` [pdm-devel] [PATCH datacenter-manager 2/3] fix #7179: cli: admin: expose acme commands Shan Shaji
2026-01-27 9:17 ` Lukas Wagner
2026-01-27 11:14 ` Shan Shaji
2026-01-27 12:09 ` Lukas Wagner [this message]
2026-01-23 17:29 ` [pdm-devel] [PATCH datacenter-manager 3/3] chore: update proxmox-acme to version 1 Shan Shaji
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DFZCZPPUN05D.1E0OFNRPBXCJ2@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=g.goller@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
--cc=s.shaji@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.