mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
localize debuglevel enum, add method
This commit is contained in:
+195
-188
File diff suppressed because it is too large
Load Diff
+13
-12
@@ -235,6 +235,16 @@ class WiFiManagerParameter {
|
||||
};
|
||||
|
||||
|
||||
// debugging
|
||||
typedef enum {
|
||||
WM_DEBUG_SILENT = 0, // debug OFF but still compiled for runtime
|
||||
WM_DEBUG_ERROR = 1, // error only
|
||||
WM_DEBUG_NOTIFY = 2, // default stable,INFO
|
||||
WM_DEBUG_VERBOSE = 3, // move verbose info
|
||||
WM_DEBUG_DEV = 4, // development useful debugging info
|
||||
WM_DEBUG_MAX = 5 // MAX extra dev auditing, var dumps etc (MAX+1 will print timing,mem and frag info)
|
||||
} wm_debuglevel_t;
|
||||
|
||||
class WiFiManager
|
||||
{
|
||||
public:
|
||||
@@ -339,6 +349,7 @@ class WiFiManager
|
||||
// toggle debug output
|
||||
void setDebugOutput(boolean debug);
|
||||
void setDebugOutput(boolean debug, String prefix); // log line prefix, default "*wm:"
|
||||
void setDebugOutput(boolean debug, wm_debuglevel_t level ); // log line prefix, default "*wm:"
|
||||
|
||||
//set min quality percentage to include in scan, defaults to 8% if not specified
|
||||
void setMinimumSignalQuality(int quality = 8);
|
||||
@@ -758,27 +769,17 @@ class WiFiManager
|
||||
int _max_params;
|
||||
WiFiManagerParameter** _params = NULL;
|
||||
|
||||
// debugging
|
||||
typedef enum {
|
||||
DEBUG_SILENT = 0, // debug OFF but still compiled for runtime
|
||||
DEBUG_ERROR = 1, // error only
|
||||
DEBUG_NOTIFY = 2, // default stable,INFO
|
||||
DEBUG_VERBOSE = 3, // move verbose info
|
||||
DEBUG_DEV = 4, // development useful debugging info
|
||||
DEBUG_MAX = 5 // MAX extra dev auditing, var dumps etc (MAX+1 will print timing,mem and frag info)
|
||||
} wm_debuglevel_t;
|
||||
|
||||
boolean _debug = true;
|
||||
String _debugPrefix = FPSTR(S_debugPrefix);
|
||||
|
||||
wm_debuglevel_t debugLvlShow = DEBUG_VERBOSE; // at which level start showing [n] level tags
|
||||
wm_debuglevel_t debugLvlShow = WM_DEBUG_VERBOSE; // at which level start showing [n] level tags
|
||||
|
||||
// build debuglevel support
|
||||
// @todo use DEBUG_ESP_x?
|
||||
|
||||
// Set default debug level
|
||||
#ifndef WM_DEBUG_LEVEL
|
||||
#define WM_DEBUG_LEVEL DEBUG_NOTIFY
|
||||
#define WM_DEBUG_LEVEL WM_DEBUG_NOTIFY
|
||||
#endif
|
||||
|
||||
// override debug level OFF
|
||||
|
||||
Reference in New Issue
Block a user