Improved logging to esp-idf

JoaoLopesF
Posts: 59
Joined: Thu Aug 17, 2017 5:40 pm

Improved logging to esp-idf

Postby JoaoLopesF » Sun Jul 29, 2018 5:31 pm

Hi,

I made one header file (log.h) to use in esp-idf projects to improve the logging.

Are simple precompiler macros to ESP_LOGx and ESP_EARLY_LOGx,
thats extends the powerfull esp-idf logging with:
  • - Show the function name thats the log origins
    This is usefull to debug, without need
    put function names in each log

    - Show the core (C0 or C1)
    That indicates the core that is executing
    the function that contains the log call
    Usefull to optimize and balance Esp32 multi-core
Example of use:

How about this:

Code: Select all

void createTask2 () {

    // Create a task 2 @ core 1 (if have it)

    logD("creating task 2");

    ....
}
And log output of esp-idf monitor will show it:

Code: Select all

D (1650)P(02) demo_log: (createTask2)(C0) creating task 2
Please access the github to more information:

https://github.com/JoaoLopesF/Esp-Idf-Improved-Logging

Who is online

Users browsing this forum: No registered users and 47 guests