Page 1 of 1

Macro Based Logging

Posted: Sat Jun 08, 2019 8:06 am
by Ritu21
Hi,

In my project, there are several components & I want to enable macro based logging in all the components. What is the best way to do this?
I have tried enabling it through below method & it works:

At component scope, define it in the component makefile:
CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG

But I want to enable the above statement on the basis of Macro just to automate the process. Could you please help me to do this??

Thanks
Ritu

Re: Macro Based Logging

Posted: Tue Jun 11, 2019 8:33 am
by Ritesh
Ritu21 wrote:
Sat Jun 08, 2019 8:06 am
Hi,

In my project, there are several components & I want to enable macro based logging in all the components. What is the best way to do this?
I have tried enabling it through below method & it works:

At component scope, define it in the component makefile:
CFLAGS += -D LOG_LOCAL_LEVEL=ESP_LOG_DEBUG

But I want to enable the above statement on the basis of Macro just to automate the process. Could you please help me to do this??

Thanks
Ritu
Hi,

MACRO based logging for individual component or for all components? Please clarify little bit for your requirements.

Re: Macro Based Logging

Posted: Tue Jun 11, 2019 9:24 am
by Ritu21
Hi Ritesh,

I want logging for all the components of my project.

Thanks
Ritu

Re: Macro Based Logging

Posted: Tue Jun 11, 2019 11:07 am
by Ritesh
Ritu21 wrote:
Tue Jun 11, 2019 9:24 am
Hi Ritesh,

I want logging for all the components of my project.

Thanks
Ritu
Hi,

I think there is kind of MACRO based Logging has been provided into ESP32 IDF like you can select it from menuconfig using which changes are applied to all components in which logging statements are added.

So, What you want apart from that? will it be not worked into your case?