From 13a73d1e48b9f0c0c250cc2efc11ab0d469e55a0 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 18 Mar 2009 20:43:19 +0000 Subject: [PATCH] Don't enable LOG_LEVEL_INFO by default and don't apply the user's debug settings until the logfile has been opened (if there is one). Patch submitted by Roland in #2624120. --- errlog.c | 7 +++++-- loadcfg.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/errlog.c b/errlog.c index 0d9f3582..e4e9ef8c 100644 --- a/errlog.c +++ b/errlog.c @@ -1,4 +1,4 @@ -const char errlog_rcs[] = "$Id: errlog.c,v 1.88 2009/03/07 11:34:36 fabiankeil Exp $"; +const char errlog_rcs[] = "$Id: errlog.c,v 1.89 2009/03/07 12:56:12 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,9 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.88 2009/03/07 11:34:36 fabiankeil E * * Revisions : * $Log: errlog.c,v $ + * Revision 1.89 2009/03/07 12:56:12 fabiankeil + * Add log_error() support for unsigned long long (%lld). + * * Revision 1.88 2009/03/07 11:34:36 fabiankeil * Omit timestamp and thread id in the mingw32 message box. * @@ -475,7 +478,7 @@ const char errlog_h_rcs[] = ERRLOG_H_VERSION; static FILE *logfp = NULL; /* logging detail level. XXX: stupid name. */ -static int debug = (LOG_LEVEL_FATAL | LOG_LEVEL_ERROR | LOG_LEVEL_INFO); +static int debug = (LOG_LEVEL_FATAL | LOG_LEVEL_ERROR); /* static functions */ static void fatal_error(const char * error_message); diff --git a/loadcfg.c b/loadcfg.c index 83a0da2e..aeb409bf 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,4 +1,4 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.90 2009/03/07 17:58:02 fabiankeil Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.91 2009/03/09 17:29:08 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ @@ -35,6 +35,11 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.90 2009/03/07 17:58:02 fabiankeil * * Revisions : * $Log: loadcfg.c,v $ + * Revision 1.91 2009/03/09 17:29:08 fabiankeil + * As of r1.88, the show-status page can use a single line for + * warnings about ignored directives and the names of the ignored + * directives themselves. Reminded by Lee, finally closes #1856559. + * * Revision 1.90 2009/03/07 17:58:02 fabiankeil * Fix two mingw32-only buffer overflows. Note that triggering * them requires control over the configuration file in which @@ -1770,8 +1775,6 @@ struct configuration_spec * load_config(void) fclose(configfp); - set_debug_level(config->debug); - freez(config->logfile); if (!no_daemon) @@ -1787,6 +1790,8 @@ struct configuration_spec * load_config(void) } } + set_debug_level(config->debug); + #ifdef FEATURE_CONNECTION_KEEP_ALIVE if (config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE) { -- 2.39.2