Use the right values for CODE_LINE and CODE_FUNC in journal traces
liuxiwei1013 at gmail.com
Thu May 13 12:09:16 AEST 2021
On Thu, May 13, 2021 at 9:51 AM Patrick Williams <patrick at stwcx.xyz> wrote:
> 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  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
We will keep following up.
More information about the openbmc