| #include <phosphor-logging/log.hpp> |
| constexpr size_t MSG_MAX_LEN = 256; |
| /** @brief Information trace (va_list format). */ |
| inline void inf(const char* format, va_list args) |
| vfprintf(stdout, format, args); |
| vsnprintf(msg, MSG_MAX_LEN, format, args); |
| phosphor::logging::log<phosphor::logging::level::INFO>(msg); |
| /** @brief Error trace (va_list format). */ |
| inline void err(const char* format, va_list args) |
| vfprintf(stderr, format, args); |
| vsnprintf(msg, MSG_MAX_LEN, format, args); |
| phosphor::logging::log<phosphor::logging::level::ERR>(msg); |
| /** @brief Information trace (printf format). */ |
| inline void inf(const char* format, ...) |
| trace::inf(format, args); |
| /** @brief Error trace (printf format). */ |
| inline void err(const char* format, ...) |
| trace::err(format, args); |