ESP32 application log output in the same format as the core log output
I love the ESP32 core level log output. It is easy to configure and gives me the file name and line number where the log output was created:
1 |
[D][BLEAdvertising.cpp:189] start(): - advertising service: 0000aaaa-ead2-11e7-80c1-9a214cf093 |
But when I want to use the same log functions for log output from my application, I have the problem that all output is mixed up and it is difficult to see the logs from my application between all the lines of the core log output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[main.cpp:24] setup(): ===================================== [V][main.cpp:25] setup(): SX126x ESP32 collector test [V][main.cpp:26] setup(): ===================================== [V][main.cpp:28] setup(): Version: 1.00 [V][main.cpp:29] setup(): Compiled: Aug 4 2019 19:45:04 [V][main.cpp:30] setup(): SDK version: v3.2.2-44-ga8916daeb [D][wifi.cpp:86] getPreferences(): Preferences: primary SSID: private pw: unknown secondary SSID: private pw: unknown [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START [D][wifi.cpp:111] createName(): Device name: PPGcoll-240AC40535E0 [D][wifi.cpp:168] scanWiFi(): Start scanning for networks [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 1 - SCAN_DONE [D][wifi.cpp:188] scanWiFi(): Found AP: private RSSI: -44 [D][wifi.cpp:188] scanWiFi(): Found AP: private RSSI: -70 [D][wifi.cpp:191] scanWiFi(): Found primary AP [D][wifi.cpp:198] scanWiFi(): Found secondary AP [D][wifi.cpp:222] scanWiFi(): RSSI Prim: -70 Sec: -70 [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START |
What I want is
Read more