-const char errlog_rcs[] = "$Id: errlog.c,v 1.55 2007/10/14 14:12:41 fabiankeil Exp $";
+const char errlog_rcs[] = "$Id: errlog.c,v 1.57 2007/10/27 13:02:26 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/errlog.c,v $
*
* Revisions :
* $Log: errlog.c,v $
+ * 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.
+ *
* Revision 1.55 2007/10/14 14:12:41 fabiankeil
* When in daemon mode, close stderr after the configuration file has been
* parsed the first time. If logfile isn't set, stop logging. Fixes BR#897436.
lock_logfile();
if (logfp != NULL)
{
+ log_error(LOG_LEVEL_INFO, "No logfile configured. Logging disabled.");
fclose(logfp);
+ logfp = NULL;
}
- logfp = NULL;
unlock_logfile();
}
lock_loginit();
lock_logfile();
- if ((logfp != NULL) && (logfp != stderr))
+ if (logfp == stderr)
+ {
+ log_error(LOG_LEVEL_INFO,
+ "Switching to daemon mode. Log messages will be written to: %s", logfname);
+ }
+ else if (logfp != NULL)
{
log_error(LOG_LEVEL_INFO, "(Re-)Open logfile \'%s\'", logfname ? logfname : "none");
}