ESP_LOGx() slow down the speed?

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

ESP_LOGx() slow down the speed?

Postby Gfast2 » Mon Jan 15, 2018 2:22 pm

Hi ESP-IDF,

If I don't connect ESP32's serial port. Would be all "ESP_LOGx()" still get called? Will they drag down ESP32's performance & eating up my precious 512KB SRAM?

If it is the case, are there ways to turn them off or just turn off some of them "on-fly"? Say turn these log level through Web Server, and the webserver call some kind of System API?

Cheers

Gfast2

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: ESP_LOGx() slow down the speed?

Postby ESP_igrr » Mon Jan 15, 2018 3:50 pm

esp_log_level_set allows filtering log messages by tag at run time. It also has a '*' wildcard to change log level for all tags.

esp_log_set_vprintf, which you already know of, can be replaced with a no-op function to prevent formatting from happening.

http://esp-idf.readthedocs.io/en/latest ... m/log.html

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: ESP_LOGx() slow down the speed?

Postby Gfast2 » Mon Jan 15, 2018 4:36 pm

Hi ESP_igrr,

BIG THANKS again! I really appreciate your answers!

(It's a shame to asking this question. After I saw your answers, I can remember, that I even have had used this API some months before... :oops: But any way. I will push myself to brew the best ESP32 project I can, and let my colleagues who develops Linux Box & pround of their achievements get a big "wow" from my ESP32 based project! :lol: 8-) )

Cheers

Gfast2

Who is online

Users browsing this forum: Google [Bot] and 112 guests