Macro Based Logging

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Macro Based Logging

Postby Ritu21 » 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

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Macro Based Logging

Postby Ritesh » Tue Jun 11, 2019 8:33 am

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.
Regards,
Ritesh Prajapati

Ritu21
Posts: 123
Joined: Sat Aug 04, 2018 9:58 am

Re: Macro Based Logging

Postby Ritu21 » Tue Jun 11, 2019 9:24 am

Hi Ritesh,

I want logging for all the components of my project.

Thanks
Ritu

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Macro Based Logging

Postby Ritesh » Tue Jun 11, 2019 11:07 am

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?
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 140 guests