From: Fabian Keil <fk@fabiankeil.de>
Date: Wed, 18 Mar 2009 21:56:30 +0000 (+0000)
Subject: In init_error_log(), suppress the "(Re-)Opening logfile" message if
X-Git-Tag: v_3_0_12~19
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/faq/static/man-page/static/gitweb.js?a=commitdiff_plain;h=9576fe0c9431ef3fa59dc74fd5c5c1b14f31ab43;p=privoxy.git

In init_error_log(), suppress the "(Re-)Opening logfile" message if
we're still logging to stderr. This restores the "silent mode", but
with LOG_LEVEL_INFO enabled, the show_version() info is written to
the logfile as intended.
---

diff --git a/errlog.c b/errlog.c
index e4e9ef8c..62973ce0 100644
--- a/errlog.c
+++ b/errlog.c
@@ -1,4 +1,4 @@
-const char errlog_rcs[] = "$Id: errlog.c,v 1.89 2009/03/07 12:56:12 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.90 2009/03/18 20:43:19 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/errlog.c,v $
@@ -33,6 +33,11 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.89 2009/03/07 12:56:12 fabiankeil E
  *
  * Revisions   :
  *    $Log: errlog.c,v $
+ *    Revision 1.90  2009/03/18 20:43:19  fabiankeil
+ *    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.
+ *
  *    Revision 1.89  2009/03/07 12:56:12  fabiankeil
  *    Add log_error() support for unsigned long long (%lld).
  *
@@ -680,7 +685,7 @@ void init_error_log(const char *prog_name, const char *logfname)
 
    lock_loginit();
 
-   if (logfp != NULL)
+   if ((logfp != NULL) && (logfp != stderr))
    {
       log_error(LOG_LEVEL_INFO, "(Re-)Opening logfile \'%s\'", logfname);
    }