From: vishwa <vishwa@linux.vnet.ibm.com>
To: John Wang <wangzhiqiang8906@gmail.com>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Yu Lei <mine260309@gmail.com>,
venture@google.com, mspinler@linux.ibm.com
Subject: Re: How to ideally fix the log function
Date: Thu, 25 Jul 2019 16:51:49 +0530 [thread overview]
Message-ID: <46f3ba00-9382-2040-80a7-519457ecd65c@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAHkHK0-dT2R6WUowZhaLgVurFPukL3tmJGneXCEijKew=1uRyA@mail.gmail.com>
Hi John,
Just some background; The goal is not to have func() pass in CODE_LINE
and CODE_FUNC since it would be a huge change all over in the code. So
the plan was to see if something can be done under the cover with no
impacts to current usage of the API.
!! Vishwa !!
On 7/25/19 6:35 AM, John Wang wrote:
> 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 ?
>
next prev parent reply other threads:[~2019-07-25 11:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 1:05 How to ideally fix the log function John Wang
2019-07-25 11:21 ` vishwa [this message]
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=46f3ba00-9382-2040-80a7-519457ecd65c@linux.vnet.ibm.com \
--to=vishwa@linux.vnet.ibm.com \
--cc=mine260309@gmail.com \
--cc=mspinler@linux.ibm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=venture@google.com \
--cc=wangzhiqiang8906@gmail.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.