]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: hno
authoramosjeffries <>
Mon, 25 Feb 2008 10:01:00 +0000 (10:01 +0000)
committeramosjeffries <>
Mon, 25 Feb 2008 10:01:00 +0000 (10:01 +0000)
Bug #2063: Hide debugging messages before cache.log is opened

various submodules tries to log informal debug messages while starting,
which ends up on stderr if these is called before cache.log is opened.

this patch changes the default debug level to 0 before cache.log is opened
only allowing critical errors to be reported on stderr.

src/cache_cf.cc
src/cf.data.pre
src/debug.cc
src/main.cc

index 0420478e07dffe51e5ca5b652bdd05aecbb8b526..6907cbed3dd36cea7b20460e64003e843832fd02 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.528 2007/11/15 23:33:05 wessels Exp $
+ * $Id: cache_cf.cc,v 1.528.2.1 2008/02/25 03:01:00 amosjeffries Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -2364,18 +2364,6 @@ parse_eol(char *volatile *var)
 #define dump_eol dump_string
 #define free_eol free_string
 
-void
-parse_debug(char *volatile *var)
-{
-    parse_eol(var);
-    safe_free(debug_options)
-    debug_options = xstrdup(Config.debugOptions);
-    Debug::parseOptions(Config.debugOptions);
-}
-
-#define dump_debug dump_string
-#define free_debug free_string
-
 static void
 dump_time_t(StoreEntry * entry, const char *name, time_t var)
 {
index 9346fc613713d879296527028b7806f504d9d9ef..4daf82ece6413a6cb76710f3f7c143ebdb1bd941 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.488.2.2 2008/02/06 06:54:40 amosjeffries Exp $
+# $Id: cf.data.pre,v 1.488.2.3 2008/02/25 03:01:00 amosjeffries Exp $
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
 # ----------------------------------------------------------
@@ -2178,7 +2178,7 @@ DOC_START
 DOC_END
 
 NAME: debug_options
-TYPE: debug
+TYPE: eol
 DEFAULT: ALL,1
 LOC: Config.debugOptions
 DOC_START
index c707ce80bbc78745a79e00a36c15063db584a20a..5d7fbbc731c380485c2b67b3a44754677fcd8eb5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: debug.cc,v 1.106 2007/12/04 15:20:22 rousskov Exp $
+ * $Id: debug.cc,v 1.106.2.1 2008/02/25 03:01:01 amosjeffries Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -445,7 +445,7 @@ Debug::parseOptions(char const *options) {
     }
 
     for (i = 0; i < MAX_DEBUG_SECTIONS; i++)
-        Debug::Levels[i] = -1;
+        Debug::Levels[i] = 0;
 
     if (options) {
         p = xstrdup(options);
index 450081af1d0d595c953904eb48eeadb37cac0628..5522e357ead7122ba6ab8c1f0cd81e87c77a3caf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.451.2.2 2008/02/17 19:41:28 serassio Exp $
+ * $Id: main.cc,v 1.451.2.3 2008/02/25 03:01:01 amosjeffries Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -1078,7 +1078,7 @@ main(int argc, char **argv)
     sbrk_start = sbrk(0);
 #endif
 
-    Debug::parseOptions("ALL,1");
+    Debug::parseOptions(NULL);
     debug_log = stderr;
 
 #if defined(SQUID_MAXFD_LIMIT)