cesp-idf

Difference between printf and ESP_LOGI?


I just want to know, what is the difference between esp's ESP_LOGx and printf, related to memory use and its other features. And which is the best to use for log ESP_LOGI, printf or any other logging function?


Solution

  • I think that for most of ad hoc debuging this it is a matter of preference with indication to use printf.

    ESP_LOG(I/W/E) are intended to implement "permanent" logging functionality in the code and is also used in the ESP-IDF itself. Then depending on debugging scenario it is possible to globally or locally enable required verbosity levels of information to receive.