Fix silly typos.
[privoxy.git] / errlog.c
index 0306242..58d1a84 100644 (file)
--- a/errlog.c
+++ b/errlog.c
@@ -1,4 +1,4 @@
-const char errlog_rcs[] = "$Id: errlog.c,v 1.56 2007/10/14 14:26:56 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.58 2007/10/28 19:04:21 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/errlog.c,v $
@@ -33,6 +33,14 @@ const char errlog_rcs[] = "$Id: errlog.c,v 1.56 2007/10/14 14:26:56 fabiankeil E
  *
  * Revisions   :
  *    $Log: errlog.c,v $
+ *    Revision 1.58  2007/10/28 19:04:21  fabiankeil
+ *    Don't mention daemon mode in "Logging disabled" message. Some
+ *    platforms call it differently and it's not really relevant anyway.
+ *
+ *    Revision 1.57  2007/10/27 13:02:26  fabiankeil
+ *    Relocate daemon-mode-related log messages to make sure
+ *    they aren't shown again in case of configuration reloads.
+ *
  *    Revision 1.56  2007/10/14 14:26:56  fabiankeil
  *    Remove the old log_error() version.
  *
@@ -514,8 +522,7 @@ void disable_logging(void)
    lock_logfile();
    if (logfp != NULL)
    {
-      log_error(LOG_LEVEL_INFO,
-         "No logfile configured while in daemon mode. Logging disabled.");
+      log_error(LOG_LEVEL_INFO, "No logfile configured. Logging disabled.");
       fclose(logfp);
       logfp = NULL;
    }
@@ -546,7 +553,6 @@ void init_error_log(const char *prog_name, const char *logfname)
    assert(NULL != logfname);
 
    lock_loginit();
-   lock_logfile();
 
    if (logfp == stderr)
    {
@@ -568,6 +574,7 @@ void init_error_log(const char *prog_name, const char *logfname)
    /* set logging to be completely unbuffered */
    setbuf(fp, NULL);
 
+   lock_logfile();
    if (logfp != NULL)
    {
       fclose(logfp);