Page 1 of 1

event loop: inhibit built-in logging

Posted: Wed Feb 22, 2023 4:52 pm
by malachib
Hi guys

Normally I am a big fan of the way event loop (such as WIFI_EVENT, IP_EVENT) also indicate a warning-level log of the source line # of the event fnptr executing.

However, I find myself in an edge case where I need that shut off.

Specifically, I am using a LOT of templates, and that log entry is giant. I have been unable to find how to do this and/or where in the esp-idf source code this logging occurs. Can anyone advise? Reducing the entire App's log level to error is not an acceptable solution.

Thank you Espressif for all your hard work. You people kick ass!

Re: event loop: inhibit built-in logging

Posted: Wed Feb 22, 2023 10:34 pm
by MicroController
Check out https://docs.espressif.com/projects/esp ... m/log.html

You can use esp_log_level_set() at run time to reduce log verbosity based on TAGs, and/or you can use the LOG_LOCAL_LEVEL macro at file or component level.

Re: event loop: inhibit built-in logging

Posted: Fri Feb 24, 2023 11:40 pm
by malachib
This gets me halfway there, so thank you.

Though file/module level adjustment gets me what I need at a minimum, I'd still like to know precisely where that stack-trace-ish thing gets emitted. It doesn't appear to be directly in esp_event.c's handler_execute since that's a plain old ESP_LOGD

I'm thinking of patching it so that if output is bigger than a certain size it does something special.

Re: event loop: inhibit built-in logging

Posted: Tue Mar 07, 2023 5:05 am
by malachib
Anyone? Does noone know precisely where and how the actual "calling line" or whatever it's called gets logged? By that I mean the orange-colored printout (presumably a log entry) which contains the line # and calling function name?

Re: event loop: inhibit built-in logging

Posted: Wed Mar 08, 2023 12:56 am
by ESP_Sprite
Do you have an example of that? Note that if the line before contains some kind of hex address, it may also be the esp-idf terminal trying to be helpful by decoding that.