Arduino core for ESP32 Wiki content

Enable log levels in PlatformIO

esp32-hal-log.h defines macros for log output depending on levels. By default the log level is set to 0 (no log enabled). To use the log macros for different levels the log level can be set for a specific project in platformio.ini

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

Example platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
build_flags = -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG

Available levels:

  • Error
  • Warning
  • Info
  • Debug
  • Verbose