esp_log_set_vprintf not redirecting system_api, phy, event, ...
Posted: Thu Sep 07, 2017 11:57 pm
I'm using esp_log_set_vprintf to redirect log output, but some is not getting redirected.
For example, after calling esp_log_set_vprintf then starting a wifi station mode connection, I get:
But, of those only the 'wifi' tagged lines actually go through my vprintf style redirection. The system_api, phy and event tagged logs don't (they go direct to the console).
The problem can be replicated by esp_log_set_vprintf with a callback function that just silently drops traffic. In that case, the wifi logs are dropped, but the others are still shown on the console:
Using 2.1 ESP-IDF. Any ideas?
For example, after calling esp_log_set_vprintf then starting a wifi station mode connection, I get:
Code: Select all
I (5455) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (5455) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (7485) phy: phy_version: 355.1, 59464c5, Jun 14 2017, 20:25:06, 0, 0
I (5455) wifi: wifi firmware version: 407bb27
I (5455) wifi: config NVS flash: enabled
I (5455) wifi: config nano formating: disabled
I (5465) wifi: Init dynamic tx buffer num: 32
I (5465) wifi: Init dynamic rx buffer num: 32
I (5465) wifi: wifi driver task: 3ffcfc7c, prio:23, stack:4096
I (5465) wifi: Init static rx buffer num: 10
I (5465) wifi: Init dynamic rx buffer num: 32
I (5465) wifi: Init rx ampdu len mblock:7
I (5465) wifi: Init lldesc rx ampdu entry mblock:4
I (9685) wifi: n:10 0, o:1 0, ap:255 255, sta:10 0, prof:1
I (10335) wifi: state: init -> auth (b0)
I (10345) wifi: state: auth -> assoc (0)
I (10345) wifi: state: assoc -> run (10)
I (10365) wifi: connected with XXXX, channel 10
I (14975) event: ip: X.X.X.X, mask: Y.Y.Y.Y, gw: Z.Z.Z.Z
I (20355) wifi: pm start, type:0
The problem can be replicated by esp_log_set_vprintf with a callback function that just silently drops traffic. In that case, the wifi logs are dropped, but the others are still shown on the console:
Code: Select all
Starting WIFI as a client...
I (15805) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (15805) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (15845) phy: phy_version: 355.1, 59464c5, Jun 14 2017, 20:25:06, 0, 0
I (20505) event: ip: X.X.X.X, mask: Y.Y.Y.Y, gw: Z.Z.Z.Z