Macros
Référence du fichier debug.h
#include <stdio.h>

Macros

#define _ESPLOGLEVEL_   1
 
#define LOGERROR(x)   if(_ESPLOGLEVEL_>0) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }
 
#define LOGERROR1(x, y)   if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }
 
#define LOGWARN(x)   if(_ESPLOGLEVEL_>1) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }
 
#define LOGWARN1(x, y)   if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }
 
#define LOGINFO(x)   if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }
 
#define LOGINFO1(x, y)   if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }
 
#define LOGDEBUG()   if(_ESPLOGLEVEL_>3) { Serial.println(MSG_TYPE_SYSTEM); }
 
#define LOGDEBUG(x)   if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM); Serial.println(x); Serial.setForcedType(false, MSG_TYPE_SYSTEM);}
 
#define LOGDEBUG0(x)   if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }
 
#define LOGDEBUG1(x, y)   if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x); Serial.print(" "); Serial.println(y, MSG_TYPE_SYSTEM);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }
 
#define LOGDEBUG2(x, y, z)   if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x); Serial.print(" "); Serial.print(y); Serial.print(" "); Serial.println(z);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }
 

Documentation des macros

◆ _ESPLOGLEVEL_

#define _ESPLOGLEVEL_   1

◆ LOGDEBUG [1/2]

#define LOGDEBUG ( )    if(_ESPLOGLEVEL_>3) { Serial.println(MSG_TYPE_SYSTEM); }

◆ LOGDEBUG [2/2]

#define LOGDEBUG (   x)    if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM); Serial.println(x); Serial.setForcedType(false, MSG_TYPE_SYSTEM);}

◆ LOGDEBUG0

#define LOGDEBUG0 (   x)    if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }

◆ LOGDEBUG1

#define LOGDEBUG1 (   x,
 
)    if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x); Serial.print(" "); Serial.println(y, MSG_TYPE_SYSTEM);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }

◆ LOGDEBUG2

#define LOGDEBUG2 (   x,
  y,
 
)    if(_ESPLOGLEVEL_>3) { Serial.setForcedType(true, MSG_TYPE_SYSTEM);Serial.print(x); Serial.print(" "); Serial.print(y); Serial.print(" "); Serial.println(z);Serial.setForcedType(false, MSG_TYPE_SYSTEM); }

◆ LOGERROR

#define LOGERROR (   x)    if(_ESPLOGLEVEL_>0) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }

◆ LOGERROR1

#define LOGERROR1 (   x,
 
)    if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }

◆ LOGINFO

#define LOGINFO (   x)    if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }

◆ LOGINFO1

#define LOGINFO1 (   x,
 
)    if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }

◆ LOGWARN

#define LOGWARN (   x)    if(_ESPLOGLEVEL_>1) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.println(x, MSG_TYPE_SYSTEM); }

◆ LOGWARN1

#define LOGWARN1 (   x,
 
)    if(_ESPLOGLEVEL_>2) { Serial.print("[WiFiEsp] ", MSG_TYPE_SYSTEM); Serial.print(x, MSG_TYPE_SYSTEM); Serial.print(" ", MSG_TYPE_SYSTEM); Serial.println(y, MSG_TYPE_SYSTEM); }