From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Gabriel Goller <g.goller@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [RFC proxmox v2 2/2] proxmox-log: added tracing infra
Date: Fri, 3 Nov 2023 11:39:39 +0100 [thread overview]
Message-ID: <lxwyytm6b3dqera43d75tatldorsjwydeaaoqgk34zsb2irqlq@b54xbp3qnmb5> (raw)
In-Reply-To: <7e885366-0948-4934-a26c-7c486ff0e5d8@proxmox.com>
On Fri, Nov 03, 2023 at 11:27:11AM +0100, Gabriel Goller wrote:
> On 11/3/23 10:52, Wolfgang Bumiller wrote:
>
> > [..]
> > > To be honest, I don't really get the advantage of a Future-Wrapper?
> > > Why not just have a:
> > > ```rust
> > > tokio::spawn(async move {
> > ^ this async{} block up here should not be necessary, `.scope()` returns
> > a future.
> >
> > > LOGGER.scope(logger, async move {
> > > // worker logic
> > > })
> > > })
> > > ```
> > > and
> > > ```rust
> > > let _child = std::thread::Builder::new()
> > > .name(upid.clone())
> > > .spawn(move || {
> > > LOGGER.sync_scope(logger, || {
> > > // worker logic
> > > })
> > > });
> > It's essentially the same, so that's fine too.
> > I'm guessing you intend to skip the boolean part then and only go with
> > whether a logger is set?
> Yes, kinda.
> I think I'll check if a FileLogger exists, then print to syslog or tasklog.
> The thing is I don't know if I should keep it simple and merge everything
> in a single layer, or if I should do the check in the Filters (of which
> there are
> two, one for each layer).
> If we merge it into a single layer, it's easy and fast, but it's not that
> clean
> anymore, we can't reuse the single layers etc..
But do we even want to right now?
If so we can still split them later.
> If we keep them separated, we have to check twice if the FileLogger exists
> (in each filter)
I'm confused, I thought one layer was only for syslog, why would we
check the file logger there?
> (it's probably not so expensive, but still) but we'll keep the FileLogLayer
> and the
> SyslogLayer separated and clean.
> What do you think?
I'd lean towards a single layer, mainly because I don't currently see
the immediate use of multiple ones.
I mean, we can still change things later if we need to.
But IMO the current set of requirements should be covered fine by one
layer.
next prev parent reply other threads:[~2023-11-03 10:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 13:53 [pbs-devel] [RFC proxmox-backup v2 0/2] Tasklog rewrite with tracing Gabriel Goller
2023-10-25 13:53 ` [pbs-devel] [RFC proxmox-backup v2 1/2] log: removed task_log! macro and moved to tracing Gabriel Goller
2023-10-27 8:31 ` Gabriel Goller
2023-10-25 13:53 ` [pbs-devel] [RFC proxmox v2 2/2] proxmox-log: added tracing infra Gabriel Goller
2023-11-02 13:43 ` Wolfgang Bumiller
2023-11-02 14:58 ` Gabriel Goller
2023-11-03 8:56 ` Wolfgang Bumiller
2023-11-03 9:24 ` Gabriel Goller
2023-11-03 9:52 ` Wolfgang Bumiller
2023-11-03 10:27 ` Gabriel Goller
2023-11-03 10:39 ` Wolfgang Bumiller [this message]
2023-11-03 10:49 ` Gabriel Goller
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=lxwyytm6b3dqera43d75tatldorsjwydeaaoqgk34zsb2irqlq@b54xbp3qnmb5 \
--to=w.bumiller@proxmox.com \
--cc=g.goller@proxmox.com \
--cc=pbs-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