using F() with log_d() ?

solexious
Posts: 3
Joined: Thu Oct 01, 2020 3:39 pm

using F() with log_d() ?

Postby solexious » Mon Oct 05, 2020 12:57 am

Heya,

I've just changed all my logging from using

Code: Select all

Serial.print
on the esp32 with arduino framework, to using

Code: Select all

log_d

Code: Select all

log_e
etc to be able to set logging levels.

But, I've noticed that doing this has bumped my ram usage by ~6%, it looks to me that its from the strings made by using

Code: Select all

log_d("This is a debug log message")
or

Code: Select all

log_d("It has been %d days since reboot", days)
where as with Serial I would use

Code: Select all

Serial.println(F("This is a debug log message"))
to put that string in to progmem.

But when I try to use F() with log_d I get errors.

Anyone know hoe to use progmem with log_d?

Cheers

Sol

Who is online

Users browsing this forum: Majestic-12 [Bot] and 105 guests