public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
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: Wed, 28 Jan 2026 09:19:02 +0100	[thread overview]
Message-ID: <DG02PPNFYXU6.11EJ1KUC36KOX@proxmox.com> (raw)
In-Reply-To: <DFZJW2H9H8VF.2IEM08U6KAB7K@proxmox.com>

On Tue Jan 27, 2026 at 6:33 PM CET, Shan Shaji wrote:
> 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?

I think yes, but definitely talk to Gabriel first. Also I'd do this in a
separate patch series, since it's mostly a cosmetic issue.

If you do this, consider leaving the `tasklog_pbs` method in place for
backwards compatibility and just add a 
  #[deprecated(note = "use ... instead")]
so that there is just a warning when compiling, not a hard error.


_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  reply	other threads:[~2026-01-28  8:19 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
2026-01-28  8:19           ` Lukas Wagner [this message]
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=DG02PPNFYXU6.11EJ1KUC36KOX@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal