OpenBMC Logging and Error Handling Dos and Don'ts

郁雷 yulei.sh at bytedance.com
Wed Jun 3 12:51:34 AEST 2020


>
> One more change I would like to see is a way to actually have the real
> filename and line number show up in the systemd log. Right now the
> filename and line number are always the logger code:
>     CODE_LINE=76
>     CODE_FUNC=helper_log
>     CODE_FILE=.../usr/include/phosphor-logging/log.hpp
>
> It looks like C++20 has a shiny new helper for this: source_location
> https://en.cppreference.com/w/cpp/experimental/source_location

Yup, this is what the logging needs to improve as well.
The new logging API is better to resolve the issue:
https://github.com/openbmc/openbmc/issues/2297


More information about the openbmc mailing list