From bba2c868a1bf29dd9aa0ad1c8b6a710a5d1ac5f8 Mon Sep 17 00:00:00 2001 From: amosjeffries <> Date: Mon, 25 Feb 2008 10:01:00 +0000 Subject: [PATCH] Author: hno 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 | 14 +------------- src/cf.data.pre | 4 ++-- src/debug.cc | 4 ++-- src/main.cc | 4 ++-- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 0420478e07..6907cbed3d 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -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) { diff --git a/src/cf.data.pre b/src/cf.data.pre index 9346fc6137..4daf82ece6 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -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 diff --git a/src/debug.cc b/src/debug.cc index c707ce80bb..5d7fbbc731 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -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); diff --git a/src/main.cc b/src/main.cc index 450081af1d..5522e357ea 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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) -- 2.47.3