]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Formal Debug Levels part 1 - Define names for some debug levels.
authoramosjeffries <>
Fri, 11 Jan 2008 12:04:02 +0000 (12:04 +0000)
committeramosjeffries <>
Fri, 11 Jan 2008 12:04:02 +0000 (12:04 +0000)
This allows the use of DBG_CRITICAL and DBG_IMPORTANT instead of magic
numbers 0 and 1 in the debugs() calls. Making code a little more readable
and easier to use. The code itself is not modified to use them yet.

DBG_DATA is added for level 9, though that may change.

TODO: the other levels (2-8) still need deciding. No consensus was reached
amongst the developers for those levels when discussed.

src/Debug.h

index dd14f96d3b69d191c0eadaa0d7410dbf4226b378..3c01c6e11bb2d5dd9baf5cceb5223980ce519541 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: Debug.h,v 1.11 2007/12/14 23:11:45 amosjeffries Exp $
+ * $Id: Debug.h,v 1.12 2008/01/11 05:04:02 amosjeffries Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
 #define assert(EX)  ((EX)?((void)0):xassert("EX", __FILE__, __LINE__))
 #endif
 
+/* defined names for Debug Levels */
+#define DBG_CRITICAL   0       /**< critical messages always shown when they occur */
+#define DBG_IMPORTANT  1       /**< important messages always shown when their section is being checked */
+/* levels 2-8 are still being discussed amongst the developers */
+#define DBG_DATA       9       /**< output is a large data dump only necessary for advanced debugging */
+
 class Debug
 {