All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Patrick Williams" <patrick@stwcx.xyz>,
	"OpenBMC List" <openbmc@lists.ozlabs.org>
Subject: Re: `phosphor-logging` APIs (RFC)
Date: Wed, 28 Jul 2021 15:22:43 +0930	[thread overview]
Message-ID: <41a334dd-56c4-44d0-b8f4-7ecdf5bfa5de@www.fastmail.com> (raw)
In-Reply-To: <YQBrbuQFz4JihBAE@heinlein>



On Wed, 28 Jul 2021, at 05:54, Patrick Williams wrote:
> Greetings,
> 
> There have been discussions before on this mailing list about the APIs present
> in phosphor-logging and some of the shortcomings they have.  I've implemented a
> new API, inside phosphor-logging, that I think resolves the issues discussed
> here and in some offline forums.
> 
> If you have an interest in the logging APIs, I would appreciate any feedback you
> may have.  If there are additional issues with the APIs that I might have
> missed, please feel free to let me know and I'll see what can be done about
> resolving them.
> 
> lg2: introduce motivation and API
>     https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/45310
> lg2: initial implementation of C++20 structured logging
>     https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-logging/+/45311
> 
> The main highlights of what I attempted to fix are:
>     - Verbose and clumsy API for previous `logging::log`.
>     - Poor compile-time identification of certain (common) issues.
>     - Source location data is invalid (issue openbmc/openbmc#2207).

I think you wanted openbmc/openbmc#2297 there, but yes!

>     - Useful data is missing from `journalctl` resulting in people working
>       around it by generating strings with `fmt` et.al.

Sounds promising! Reading the proposal it seems like you're appending 
certain bits of structured data to the message. I think it would be 
nice if the data could be interpolated into arbitrary positions and not 
just appended (note, I'm not asking for interpolation of arbitrary 
variables here unlike what can be achieved with raw use of fmt, only 
those captured via the structured logging).

>     - No logging present when running on a TTY.

Great, this has caused quite a bit of confusion in the past.

Andrew

  reply	other threads:[~2021-07-28  5:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 20:24 `phosphor-logging` APIs (RFC) Patrick Williams
2021-07-28  5:52 ` Andrew Jeffery [this message]
2021-07-28  6:25   ` Patrick Williams
2021-07-28 23:34     ` Andrew Jeffery
2021-07-29  2:53       ` Patrick Williams
2021-08-03  0:27         ` Patrick Williams
2021-08-03  4:07           ` Andrew Jeffery

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=41a334dd-56c4-44d0-b8f4-7ecdf5bfa5de@www.fastmail.com \
    --to=andrew@aj.id.au \
    --cc=openbmc@lists.ozlabs.org \
    --cc=patrick@stwcx.xyz \
    /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.