From: amosjeffries <> Date: Fri, 11 Jan 2008 12:04:02 +0000 (+0000) Subject: Formal Debug Levels part 1 - Define names for some debug levels. X-Git-Tag: BASIC_TPROXY4~196 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=feefade10d4bfa6f98430a83576189ea6b7a0287;p=thirdparty%2Fsquid.git Formal Debug Levels part 1 - Define names for some debug levels. 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. --- diff --git a/src/Debug.h b/src/Debug.h index dd14f96d3b..3c01c6e11b 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -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 @@ -52,6 +52,12 @@ #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 {