Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying default log level does not work #215

Closed
rdeterre opened this issue Jun 17, 2024 · 2 comments
Closed

Modifying default log level does not work #215

rdeterre opened this issue Jun 17, 2024 · 2 comments

Comments

@rdeterre
Copy link

Bug description

Setting the values of CONFIG_LOG_DEFAULT_LEVEL and CONFIG_LOG_MAXIMUM_LEVEL in sdkconfig.defaults appears to have no effect on the compiled project.

To Reproduce

Steps to reproduce the behavior:

  1. Generate a project with this template cargo generate esp-rs/esp-idf-template cargo
    🤷   Project Name: test2
    🔧   Destination: /Users/romain/Documents/test2 ...
    🔧   project-name: test2 ...
    🔧   Generating template ...
    ✔ 🤷   Which MCU to target? · esp32
    ✔ 🤷   Configure advanced template options? · false
    
  2. Add the following lines to sdkconfig.defaults (based on log config documentation here) and add a log::debug!("Debug log!") line in main() to test if debug logs are printed
    CONFIG_LOG_DEFAULT_LEVEL=4
    CONFIG_LOG_MAXIMUM_LEVEL=4
    
  3. Compile the project: cargo build
  4. Flash and run cargo espflash flash --monitor

Expected behavior

Expect to see the "Debug log!" message appear in the log file

Screenshots

Environment

  • OS: macOS
  • How did you install the environment: espup 0.11.0
@Vollbrecht
Copy link
Collaborator

Vollbrecht commented Jun 17, 2024

your values that you put into sdkconfig are wrong. If you look at the offical docu, you should use the values like they are shown in the available options sections.

CONFIG_LOG_DEFAULT_LEVEL_WARN=y
CONFIG_LOG_MAXIMUM_LEVEL_WARN=y

@rdeterre
Copy link
Author

Ah, that was it! Thanks and sorry for the noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants