Minor changes for debug (indent, and set LWIP_DBG_TYPES_ON to LWIP_DBG_ON to have all traces selected display per default, in the same spirit that LWIP_DBG_MIN_LEVEL is set per default to LWIP_DBG_LEVEL_OFF)

This commit is contained in:
fbernon 2007-09-22 11:16:07 +00:00
parent c7e91d3302
commit c52ef1d2b3
2 changed files with 21 additions and 22 deletions

View File

@ -40,12 +40,11 @@
* - 2 serious * - 2 serious
* - 3 severe * - 3 severe
*/ */
#define LWIP_DBG_LEVEL_OFF 0x00
#define LWIP_DBG_LEVEL_OFF 0 #define LWIP_DBG_LEVEL_WARNING 0x01 /* bad checksums, dropped packets, ... */
#define LWIP_DBG_LEVEL_WARNING 1 /* bad checksums, dropped packets, ... */ #define LWIP_DBG_LEVEL_SERIOUS 0x02 /* memory allocation failures, ... */
#define LWIP_DBG_LEVEL_SERIOUS 2 /* memory allocation failures, ... */ #define LWIP_DBG_LEVEL_SEVERE 0x03
#define LWIP_DBG_LEVEL_SEVERE 3 /* */ #define LWIP_DBG_MASK_LEVEL 0x03
#define LWIP_DBG_MASK_LEVEL 3
/** flag for LWIP_DEBUGF to enable that debug message */ /** flag for LWIP_DEBUGF to enable that debug message */
#define LWIP_DBG_ON 0x80U #define LWIP_DBG_ON 0x80U

View File

@ -1244,12 +1244,21 @@
---------- Debugging options ---------- ---------- Debugging options ----------
--------------------------------------- ---------------------------------------
*/ */
/**
* LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
* compared against this value. If it is smaller, then debugging
* messages are written.
*/
#ifndef LWIP_DBG_MIN_LEVEL
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#endif
/** /**
* LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
* debug messages of certain types. * debug messages of certain types.
*/ */
#ifndef LWIP_DBG_TYPES_ON #ifndef LWIP_DBG_TYPES_ON
#define LWIP_DBG_TYPES_ON 0 #define LWIP_DBG_TYPES_ON LWIP_DBG_ON
#endif #endif
/** /**
@ -1477,13 +1486,4 @@
#define SNMP_MIB_DEBUG LWIP_DBG_OFF #define SNMP_MIB_DEBUG LWIP_DBG_OFF
#endif #endif
/**
* LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
* compared against this value. If it is smaller, then debugging
* messages are written.
*/
#ifndef LWIP_DBG_MIN_LEVEL
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_OFF
#endif
#endif /* __LWIP_OPT_H__ */ #endif /* __LWIP_OPT_H__ */