From 9576fe0c9431ef3fa59dc74fd5c5c1b14f31ab43 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 18 Mar 2009 21:56:30 +0000 Subject: [PATCH] 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. --- errlog.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); } -- 2.39.2