All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: George Liu <liuxiwei1013@gmail.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Use the right values for CODE_LINE and CODE_FUNC in journal traces
Date: Wed, 12 May 2021 20:51:08 -0500	[thread overview]
Message-ID: <YJyGDAcEtdpcC0C1@heinlein> (raw)
In-Reply-To: <CANFuQ7D-ujDJ0ZwE4QEYRPCSM78d3SdUuT=pB2Fk3t18QMr95Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

On Tue, May 11, 2021 at 02:03:19PM +0800, George Liu wrote:
> But for the log method, has defined a variable parameter, so it can
> not receive a default parameter again.
> link: https://github.com/openbmc/phosphor-logging/blob/master/phosphor-logging/log.hpp#L157
> 
> Does everyone have a better way to process it? Please let me know and
> we can discuss it here.

There was similiar discussion in the past of using source_location to
get the real file/line as you suggested.  I don't think anyone put tons
of thought into how to get it into the function though.

source_location isn't supported by GCC until 11 per [1] and we don't
have that in Yocto yet.  I know I was at least holding off until we get
that to do much experimentation.

1. https://en.cppreference.com/w/cpp/compiler_support

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-05-13  1:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  6:03 Use the right values for CODE_LINE and CODE_FUNC in journal traces George Liu
2021-05-13  1:51 ` Patrick Williams [this message]
2021-05-13  2:09   ` George Liu

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=YJyGDAcEtdpcC0C1@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=liuxiwei1013@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    /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.