event loop: inhibit built-in logging

malachib
Posts: 18
Joined: Tue Aug 28, 2018 9:06 am

event loop: inhibit built-in logging

Postby malachib » Wed Feb 22, 2023 4:52 pm

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!

MicroController
Posts: 1696
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: event loop: inhibit built-in logging

Postby MicroController » Wed Feb 22, 2023 10:34 pm

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.

malachib
Posts: 18
Joined: Tue Aug 28, 2018 9:06 am

Re: event loop: inhibit built-in logging

Postby malachib » Fri Feb 24, 2023 11:40 pm

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.

malachib
Posts: 18
Joined: Tue Aug 28, 2018 9:06 am

Re: event loop: inhibit built-in logging

Postby malachib » Tue Mar 07, 2023 5:05 am

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?

ESP_Sprite
Posts: 9711
Joined: Thu Nov 26, 2015 4:08 am

Re: event loop: inhibit built-in logging

Postby ESP_Sprite » Wed Mar 08, 2023 12:56 am

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.

Who is online

Users browsing this forum: No registered users and 74 guests