Skip to content

Commit

Permalink
Added comment explaining the addition of color codes in pigweed logger
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdp committed May 8, 2023
1 parent fc2105d commit 30854b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/platform/esp32/PigweedLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ static const char * getLogColorForLevel(esp_log_level_t level)
}
}

// ESP_LOGx(...) logs are funneled to esp_log_write() and it has the specific format. It contains color codes,
// log level character, timestamp, tag, and actual log message. Everything here is part of format and variadic argument.
//
// ChipLogx(...) logs are funneled to esp_log_writev() will only have actual log message without color codes, log level
// character, timestamp, and tag. So, to match up __wrap_esp_log_writev() adds those details when sending log to pigweed
// logger.
extern "C" void __wrap_esp_log_write(esp_log_level_t level, const char * tag, const char * format, ...)
{
va_list v;
Expand Down

0 comments on commit 30854b9

Please sign in to comment.