Andrei Litvin | 5630230 | 2021-02-12 15:44:09 -0500 | [diff] [blame] | 1 | /* See Project CHIP LICENSE file for licensing information. */ |
| 2 | |
| 3 | #pragma once |
| 4 | |
Justin Wood | 0e14979 | 2022-01-06 21:52:51 +0100 | [diff] [blame] | 5 | #include <lib/support/EnforceFormat.h> |
Andrei Litvin | 5630230 | 2021-02-12 15:44:09 -0500 | [diff] [blame] | 6 | #include <stdarg.h> |
| 7 | #include <stdint.h> |
| 8 | |
| 9 | namespace chip { |
| 10 | namespace Logging { |
| 11 | namespace Platform { |
| 12 | |
| 13 | /** |
| 14 | * Log, to the platform-specified mechanism, the specified log |
| 15 | * message, @a msg, for the specified module, @a module, in the |
| 16 | * provided category, @a category. |
| 17 | * |
| 18 | * @param[in] module The name of the log module. |
| 19 | * @param[in] category A LogCategory enumeration indicating the |
| 20 | * category of the log message. The category |
| 21 | * may be filtered in or out if |
| 22 | * CHIP_LOG_FILTERING was asserted. |
| 23 | * @param[in] msg A pointer to a NULL-terminated C string with |
| 24 | * C Standard Library-style format specifiers |
| 25 | * containing the log message to be formatted and |
| 26 | * logged. |
| 27 | * @param[in] v A variadic argument list whose elements should |
| 28 | * correspond to the format specifiers in @a msg. |
| 29 | * |
| 30 | */ |
Justin Wood | 0e14979 | 2022-01-06 21:52:51 +0100 | [diff] [blame] | 31 | void ENFORCE_FORMAT(3, 0) LogV(const char * module, uint8_t category, const char * msg, va_list v); |
Andrei Litvin | 5630230 | 2021-02-12 15:44:09 -0500 | [diff] [blame] | 32 | |
| 33 | } // namespace Platform |
| 34 | } // namespace Logging |
| 35 | } // namespace chip |