X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=errlog.c;h=dc1584503ea737eb1bdd83f0026baf0789dfb25f;hb=ecc029c86cab6da6b915bb80714db895e78034a2;hp=0d9f35829b1de3f91022f71be7d64c4372d300cb;hpb=50f3d8d489afec93fee33c266d349f0b9fe8f38f;p=privoxy.git diff --git a/errlog.c b/errlog.c index 0d9f3582..dc158450 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.91 2009/03/18 21:56:30 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/errlog.c,v $ @@ -33,6 +33,20 @@ 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.91 2009/03/18 21:56:30 fabiankeil + * 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. + * + * 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). + * * Revision 1.88 2009/03/07 11:34:36 fabiankeil * Omit timestamp and thread id in the mingw32 message box. * @@ -475,7 +489,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); @@ -677,7 +691,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); } @@ -731,18 +745,7 @@ void init_error_log(const char *prog_name, const char *logfname) logfp = fp; unlock_logfile(); -#if !defined(_WIN32) - /* - * Prevent the Windows GUI from showing the version two - * times in a row on startup. It already displayed the show_version() - * call from main() that other systems write to stderr. - * - * This means mingw32 users will never see the version in their - * log file, but I assume they wouldn't look for it there anyway - * and simply use the "Help/About Privoxy" menu. - */ show_version(prog_name); -#endif /* def unix */ unlock_loginit();