How to print debug message in the OpenBMC

Viewed 321

I want to print debug message in the bmcweb of OpenBMC. The development language of OpenBMC is c++, and I print the message through printf and cout, but it does't work. In the console of qemu, I can not see any message I print ....

Any one could help me ? >__< Thank you very much!

2 Answers

In the OpenBMC console, enter journalctl to show system log.

It works to use printf and look at the journalctl (journalctl -u bmcweb), for quick debugging. However, bmcweb does a have logging wrapper that would be better for long term code changes.

BMCWEB_LOG_ERROR << "UNIX socket: async_accept error = ";

Then make sure BMCWEB_ENABLE_LOGGING is set in the recipe build.

Related