-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
Debugging firmware errors with #define DEVELOP_VERSION
results in excessive and unwanted debugging messages through the NODE_DBG()
macro which is defined as c_printf
when enabled, and nothing when disabled.
I suggest splitting NODE_DBG into one macro per module, which can be individually enabled in app/include/user_config.h
. There'd be 30-40 of these macros, so a naming standard is required, and I suggest using DEBUG_MODULE_MODULENAME.
To start, I edited net.c:
#define DEBUG_MODULE_NET
and bulk-changed NODE_DBG to DEBUG_MODULE_NET
--- a/app/modules/net.c
+++ b/app/modules/net.c
@@ -59,7 +59,7 @@ typedef struct lnet_userdata
static void net_server_disconnected(void *arg) // for tcp server only
{
- NODE_DBG("net_server_disconnected is called.\n");
+ DEBUG_MODULE_NET("net_server_disconnected is called.\n");
struct espconn *pesp_conn = arg;
if(pesp_conn == NULL)
return;
and that had the desired effect of eliminating just those messages, while leaving other debugging (which I added according to issue #795) intact.
Metadata
Metadata
Assignees
Labels
No labels