Increase ESP-IDF logging level

#1

I’m trying to increase the level of wifi logging in my console.

I tried adding the following in my main.c (within mgos_app_init):
esp_log_level_set("wifi", ESP_LOG_VERBOSE);

However, this seems to make no difference. How should I go about increasing the level of wifi logging to Verbose? (My debug.level=3)

#3

Debug is Mongoose-OS debug, you are working on IDF debug and that is probably filtered out by Mongoose-OS.
Did you try debug.level =4 ? That is “verbose” in mos.

#4

@needlerp Have a look here

mos’s debug.level does not control esp-idf’s log level.

#5

Thanks @nliviu - that was what I was looking for, but unfortunately now I just get a core dump on boot:

[Jul 30 16:58:35.579] I (17707) wifi: rsn valid: gcipher=3 ucipher=3 akm=5
[Jul 30 16:58:35.671] Guru Meditation Error: Core  0 panic'ed (Unhandled debug exception)
[Jul 30 16:58:35.671] Debug exception reason: Stack canary watchpoint triggered (wifi) 
[Jul 30 16:58:35.671] Core 0 register dump:
[Jul 30 16:58:35.671] PC      : 0x40088849  PS      : 0x00060436  A0      : 0x80088879  A1      : 0x3ffcc7e0  
[Jul 30 16:58:35.671] A2      : 0x00000000  A3      : 0x3ffcc810  A4      : 0x00060220  A5      : 0x3ffcc9f0  
[Jul 30 16:58:35.671] A6      : 0x00000000  A7      : 0x3ffcc800  A8      : 0x00000000  A9      : 0x3ffcc7c0  
[Jul 30 16:58:35.671] A10     : 0x00000000  A11     : 0x00000005  A12     : 0x00000001  A13     : 0x3ffcc950  
[Jul 30 16:58:35.671] A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000004  EXCCAUSE: 0x00000001  
[Jul 30 16:58:35.671] EXCVADDR: 0x00000000  LBEG    : 0x40085868  LEND    : 0x40085872  LCOUNT  : 0x00000000  
[Jul 30 16:58:35.671] 
[Jul 30 16:58:35.671] ELF file SHA256: ad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0ba
[Jul 30 16:58:35.671] 
[Jul 30 16:58:35.671] Backtrace: 0x40088849 0x40088876 0x40088fe9 0x400849ed 0x400ed56b 0x400ecf28 0x400f17e9 0x401a0acd 0x400f499d 0x400f51bd 0x400f1805 0x400ec87d 0x400e409d 0x4000bd9f 0x4008ec25 0x4015a77d 0x4015a6d4 0x400fdbd8 0x400fde15 0x400e570a 0x400e45cc 0x400e6f49 0x400e4055 0x4000bd83 0x4008ec0b 0x4008ee25 0x4008eea1 0x4008ff43 0x400d7e2d 0x400de12a 0x400de291 0x400e7575 0x40083eda 0x401272f9 0x401286fb 0x40099ccd 0x4009ac19 0x40091171 0x400945f4
[Jul 30 16:58:35.759] 
[Jul 30 16:58:35.759] Guru Meditation Error: Core  0 panic'ed (Cache disabled but cached memory region accessed)
[Jul 30 16:58:35.759] Core 0 register dump:
[Jul 30 16:58:35.759] PC      : 0x4008355c  PS      : 0x00040034  A0      : 0x00040023  A1      : 0x3ffcc530  
[Jul 30 16:58:35.759] A2      : 0x3ffcc5a0  A3      : 0x00000000  A4      : 0x0000000d  A5      : 0x3ffcc670  
[Jul 30 16:58:35.759] A6      : 0x3ffb1d20  A7      : 0x3ffb1d29  A8      : 0x80089e4c  A9      : 0x40083545  
[Jul 30 16:58:35.759] A10     : 0x383fc000  A11     : 0x383fc000  A12     : 0x00000009  A13     : 0x00000061  
[Jul 30 16:58:35.759] A14     : 0x003d0000  A15     : 0x00001600  SAR     : 0x00000019  EXCCAUSE: 0x00000007  
[Jul 30 16:58:35.759] EXCVADDR: 0x00000000  LBEG    : 0x4008f018  LEND    : 0x4008f046  LCOUNT  : 0x00000000  
[Jul 30 16:58:35.759] 
[Jul 30 16:58:35.759] ELF file SHA256: ad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0baad0bd0ba
[Jul 30 16:58:35.759] 
[Jul 30 16:58:35.759] Backtrace: 0x4008355c 0x00040020 0x40112c7f 0x40089c14 0x400834c5
[Jul 30 16:58:35.759] 
[Jul 30 16:58:35.759] Re-entered core dump! Exception happened during core dump!
[Jul 30 16:58:35.764] Rebooting...
#6

I did test the empty application with CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE=y and did not have any core dump.

#7

Thanks, I had debug.level=3 and also file_logger.enable=true which was all too much for it to cope with. Turned those down/off and it runs OK now.