All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Wang <wangzhiqiang8906@gmail.com>
To: OpenBMC Maillist <openbmc@lists.ozlabs.org>,
	Yu Lei <mine260309@gmail.com>,
	venture@google.com,  mspinler@linux.ibm.com,
	vishwa <vishwa@linux.vnet.ibm.com>
Subject: How to ideally fix the log function
Date: Thu, 25 Jul 2019 09:05:36 +0800	[thread overview]
Message-ID: <CAHkHK0-dT2R6WUowZhaLgVurFPukL3tmJGneXCEijKew=1uRyA@mail.gmail.com> (raw)

Hi all

I am just curious about how to ideally fix the log function

Currently,error log code location metadata is not useful, link:
https://github.com/openbmc/openbmc/issues/2297

That issue mentioned several solutions,But I am still confused.

The call stack of phsophor::logging:log<>() is like this:

func() -> log<>() -> helper_log() -> sd_journal_send

We need to pass arguments(CODE_LINE and CODE_FILE) from `func` to
`sd_journal_send`,right?

Ideally:

template <level L, typename Msg, typename... Entry>
void log(Msg msg, Entry... e,
  const source_location& location = source_location::current())

but packs must be last.

is there any suggestions ?

             reply	other threads:[~2019-07-25  1:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25  1:05 John Wang [this message]
2019-07-25 11:21 ` How to ideally fix the log function vishwa
2019-07-26  2:08   ` Andrew Jeffery
2019-07-26  3:03     ` John Wang
2019-07-29  0:26       ` Andrew Jeffery
2019-07-29  7:53         ` John Wang

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='CAHkHK0-dT2R6WUowZhaLgVurFPukL3tmJGneXCEijKew=1uRyA@mail.gmail.com' \
    --to=wangzhiqiang8906@gmail.com \
    --cc=mine260309@gmail.com \
    --cc=mspinler@linux.ibm.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=venture@google.com \
    --cc=vishwa@linux.vnet.ibm.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.