1 /* See Project CHIP LICENSE file for licensing information. */
3 #include <platform/logging/LogV.h>
5 #include <core/CHIPConfig.h>
6 #include <support/logging/Constants.h>
10 #ifdef LOG_LOCAL_LEVEL
11 #undef LOG_LOCAL_LEVEL
13 #define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
21 void LogV(const char * module, uint8_t category, const char * msg, va_list v)
25 snprintf(tag, sizeof(tag), "chip[%s]", module);
26 tag[sizeof(tag) - 1] = 0;
28 char formattedMsg[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE];
29 vsnprintf(formattedMsg, sizeof(formattedMsg), msg, v);
33 case kLogCategory_Error:
34 ESP_LOGE(tag, "%s", formattedMsg);
36 case kLogCategory_Progress:
38 ESP_LOGI(tag, "%s", formattedMsg);
40 case kLogCategory_Detail:
41 ESP_LOGV(tag, "%s", formattedMsg);
46 } // namespace Platform
47 } // namespace Logging