Default log level for esp32 arduino changed?

It seems that with some latest update the default log level has been fixed to Error, where i could vary it depending on my needs before. I am using the Arduino env.
What worked before is to either set

#define LOG_LOCAL_LEVEL ESP_LOG_DEBUG

before esp_log.h is loaded, or to specify

build_flags = -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG

as described in Espressif32 (ESP-IDF) - how to enable debug mode via `platformio.ini`?

Neither works on a full re-install of Visual Studio Code with platform.io IDE plugin. Interestingly it still works on the other computer with a somewhat older VS Code installation, but updated (0.9) platform.io plugin.

I wonder how i could go on here… I wonder whether i need to compile my own version of the platform.io esp32 lib… how would i do this?

See updated docs http://esp-idf.readthedocs.io/en/v2.1.1/api-reference/system/log.html

Maybe, you need to post your question here Issues · espressif/arduino-esp32 · GitHub

I discovered the same problem. In my application i see only logs of level error, no logs of evel info or warning. Tried several log settings, no success. Help needed… :worried:

Meanwhile i found the root cause, but the workarounds described here and here both do not work with PlatformIO platform Espressif32 with framework arduino :frowning:

Finally i found the crucial hint which solves this problem! :grinning:

Set log level for a specific project
Edit platformio.ini (located in the project folder) Add (or extend) the build_flags option: **build_flags = -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG**

Hi,

I tried your solution and it doesn’t work for me.
I am setting my build flags in platformio.ini as this, I want log level info.
build_flags =
-DCORE_DEBUG_LEVEL=3
-DCONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=3
However, i cannot even see esp error logs.
I checked the value of this definitions at runtime and they are ok ( all 3 which is esp info level):
ARDUHAL_LOG_LEVEL
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL
CONFIG_LOG_DEFAULT_LEVEL
CORE_DEBUG_LEVEL

For esp32 Arduino, to enable log_x macros on Serial (or Serial1, etc), try adding this to setup() for whichever HardwareSerial you are using.

Serial.setDebugOutput(true);

And add this to platformio.ini for whatever log level you want…

build_flags =
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG

1 Like