ESP32: LOG macros

Hello,
setting build_flags=-DCORE_DEBUG_LEVEL=5 ignores all local (component, file) level setting for the project. Questions:

  1. what is CODE_DEBUG_LEVEL ?
  2. what is the proper way to control the level of logging on Arduino framework with pio?