[GH-ISSUE #1135] Use ESP's logging API #972

Open
opened 2026-02-28 01:27:54 +03:00 by kerem · 1 comment
Owner

Originally created by @nikeee on GitHub (Oct 19, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1135

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

Currently, WiFiManager uses a custom logging infrastructure to log stuff:
github.com/tzapu/WiFiManager@e454c9969a/WiFiManager.h (L561-L594)

However, ESP-IDF offers an API for logging (which is also part of Arduino):
https://thingpulse.com/esp32-logging/

It offers tagging (which would be *WM) as well as setting the verbosity at compile time as well as runtime.

Is this something that could be used? If so I'd be hapy to do a PR.

Originally created by @nikeee on GitHub (Oct 19, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1135 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [x] Development **Esp8266/Esp32:** - [ ] ESP8266 - [x] ESP32 **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [x] staging (master/dev) ### Description Currently, WiFiManager uses a custom logging infrastructure to log stuff: https://github.com/tzapu/WiFiManager/blob/e454c9969a327bcf1be221d19380381e08ca515c/WiFiManager.h#L561-L594 However, ESP-IDF offers an API for logging (which is also part of Arduino): https://thingpulse.com/esp32-logging/ It offers tagging (which would be `*WM`) as well as setting the verbosity at compile time as well as runtime. Is this something that could be used? If so I'd be hapy to do a PR.
Author
Owner

@tablatronix commented on GitHub (Oct 19, 2020):

Definitely , I have thought about that, if you can think of a way to simply modify the outputs of the existing logger functions?

I would rather not replace them in case we ever support another micro etc.

Maybe just swap wm serial output via a define to ESP_ logs instead, and maybe we can add a variable prefix to pass also instead of *wm

Alternative would be to redefine the logging functions at compile time. But I have a few weird ones.. Like key,value pairs

<!-- gh-comment-id:712345689 --> @tablatronix commented on GitHub (Oct 19, 2020): Definitely , I have thought about that, if you can think of a way to simply modify the outputs of the existing logger functions? I would rather not replace them in case we ever support another micro etc. Maybe just swap wm serial output via a define to ESP_ logs instead, and maybe we can add a variable prefix to pass also instead of *wm Alternative would be to redefine the logging functions at compile time. But I have a few weird ones.. Like key,value pairs
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#972
No description provided.