mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-16 16:01:36 +10:00
Replace multi-page portal with hash-routed SPA, DFTE shell placeholders, and data-first JSON APIs. Remove legacy routes, root-template override path, and HTML-derived info pipeline. Add bootstrap feature flags, in-DOM toast/dialog UX, OTA via POST /u, and tests for shell, bootstrap, API JSON, and captive host rule. Rewrite README as fork disclaimer and modernization overview.
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
/**
|
|
* WiFiManagerDfteLogger.h
|
|
*
|
|
* @author alexhopeoconnor
|
|
* @license MIT
|
|
*
|
|
* Optional bridge from DFTE's logging hooks to WiFiManager::log.
|
|
* Enabled only when the sketch / library build defines WM_DFTE_LOGGING.
|
|
*/
|
|
|
|
#ifndef WiFiManagerDfteLogger_h
|
|
#define WiFiManagerDfteLogger_h
|
|
|
|
#if defined(ESP8266) || defined(ESP32)
|
|
|
|
#include <DeviceFrameworkTemplateEngineDebug.h>
|
|
#include "WiFiManager.h"
|
|
|
|
/**
|
|
* Forwards DeviceFrameworkTemplateEngineLogger calls to WiFiManager logging
|
|
* with subsystem WM/DFTE.
|
|
*/
|
|
class WiFiManagerDfteLogger : public DeviceFrameworkTemplateEngineLogger {
|
|
public:
|
|
explicit WiFiManagerDfteLogger(WiFiManager* wm) : _wm(wm) {}
|
|
|
|
void error(const String& msg) override { logLine(WiFiManagerLogLevel::Error, msg); }
|
|
void warn(const String& msg) override { logLine(WiFiManagerLogLevel::Warn, msg); }
|
|
void info(const String& msg) override { logLine(WiFiManagerLogLevel::Debug, msg); }
|
|
void debug(const String& msg) override { logLine(WiFiManagerLogLevel::Trace, msg); }
|
|
|
|
private:
|
|
WiFiManager* _wm;
|
|
|
|
void logLine(WiFiManagerLogLevel level, const String& msg) {
|
|
if (!_wm) {
|
|
return;
|
|
}
|
|
_wm->log(level, "WM/DFTE", msg);
|
|
}
|
|
};
|
|
|
|
#endif // ESP8266 || ESP32
|
|
|
|
#endif // WiFiManagerDfteLogger_h
|