espressif / esp32-wifi-lib

ESP32 WiFi stack precompiled libraries
Apache License 2.0
167 stars 71 forks source link

Log format complication with esp_log_set_vprintf #33

Open bshubenok-sigma opened 1 year ago

bshubenok-sigma commented 1 year ago

In our project we're using esp_log_set_vprintf to combine logs from esp-idf and our app and send them to custom logger. Logs from other modules comes as single message, but from wifi module message comes separated in three:

1: "%c (%d) %s:" --> I (6960) wifi:
2: "state: %s -> %s (%x)" --> state: init -> auth (b0)
3: "%s" --> '\n'

As there no way - is it? - to find that this is single message and not three different ones, in final log it looks something like this:

I (6960) wifi:
I (6960) : state: init -> auth (b0)

This does not break anything, but make logs look worse than they could. Is this the issue on my end or was this made intentional for some reason? Can this be fixed in library to look like other components?