]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2063: Hide debugging messages before cache.log is opened
authorhno <>
Sun, 30 Dec 2007 01:20:22 +0000 (01:20 +0000)
committerhno <>
Sun, 30 Dec 2007 01:20:22 +0000 (01:20 +0000)
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 2a23779a4300e5284dcc3ccccbedbd2759df9ecb..bef3b352074dc19fca5b42f0de9536ff9b11d0de 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.531 2007/12/27 15:48:53 hno Exp $
+ * $Id: cache_cf.cc,v 1.532 2007/12/29 18:20:22 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -2356,18 +2356,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 f9e15f2f1fadfdfa172c4fa0e12b7e5f12f01d44..34b1cd21fe0ba6956f52ab366f3ec22f27035bdd 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.491 2007/12/27 15:48:53 hno Exp $
+# $Id: cf.data.pre,v 1.492 2007/12/29 18:20:22 hno Exp $
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
 # ----------------------------------------------------------
@@ -2203,7 +2203,7 @@ DOC_START
 DOC_END
 
 NAME: debug_options
-TYPE: debug
+TYPE: eol
 DEFAULT: ALL,1
 LOC: Config.debugOptions
 DOC_START
@@ -2276,6 +2276,7 @@ NAME: netdb_filename
 TYPE: string
 DEFAULT: @DEFAULT_NETDB_FILE@
 LOC: Config.netdbFilename
+IFDEF: USE_ICMP
 DOC_START
        A filename where Squid stores it's netdb state between restarts.
        To disable, enter "none".
index e14f25dc2231a980996d98a31a2423790cbe0dd4..3e8a4b72edfe73c56c10f77ff2ebbb3b06465ea0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: debug.cc,v 1.107 2007/12/14 23:11:46 amosjeffries Exp $
+ * $Id: debug.cc,v 1.108 2007/12/29 18:20:22 hno 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 ed11df33dbb16ae9a2c3a50d9102dd09abe74818..1873745afb6a906eb667c7db66e57be0f917c3cf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.452 2007/12/14 23:11:47 amosjeffries Exp $
+ * $Id: main.cc,v 1.453 2007/12/29 18:20:22 hno 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)