1

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!

林姿均
  • 21
  • 3

2 Answers2

0

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

林姿均
  • 21
  • 3
0

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.

John b
  • 1,338
  • 8
  • 16
  • 1
    That's right, I enabled BMCWEB_ENABLE_LOGGING, the log is displayed correctly, thank you for your help! – 林姿均 Mar 29 '22 at 03:22