From: "Shan Shaji" <s.shaji@proxmox.com>
To: "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 18:33:59 +0100 [thread overview]
Message-ID: <DFZJW2H9H8VF.2IEM08U6KAB7K@proxmox.com> (raw)
In-Reply-To: <DFZCZPPUN05D.1E0OFNRPBXCJ2@proxmox.com>
On Tue Jan 27, 2026 at 1:09 PM CET, Lukas Wagner wrote:
> 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()`.
Hey lukas, thank you so much for the detailed explanation.
Makes sense to register both the tasklog_pbs() and stderr() layers.
> 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).
then should i rename the function to `tasklog` and update all call sites
in both PDM and PBS?
_______________________________________________
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 17:34 UTC|newest]
Thread overview: 14+ 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
2026-01-27 17:33 ` Shan Shaji [this message]
2026-01-28 8:19 ` Lukas Wagner
2026-01-28 9:26 ` Gabriel Goller
2026-01-28 9:35 ` Shan Shaji
2026-02-03 17:55 ` Shan Shaji
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=DFZJW2H9H8VF.2IEM08U6KAB7K@proxmox.com \
--to=s.shaji@proxmox.com \
--cc=g.goller@proxmox.com \
--cc=l.wagner@proxmox.com \
--cc=pdm-devel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox