]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
use correct facility in LOG messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 7 Sep 2016 08:37:26 +0000 (10:37 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 7 Sep 2016 09:16:01 +0000 (11:16 +0200)
logging.c
main.c
tempcomp.c

index 35562c036e30bcf7ec9c9bde3339cd3d15e46b26..e09203ae0530adc60c9bd5d9d1e7845ac52a81c5 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -249,7 +249,7 @@ LOG_FileWrite(LOG_FileID id, const char *format, ...)
     if (snprintf(filename, sizeof(filename), "%s/%s.log",
                  logdir, logfiles[id].name) >= sizeof (filename) ||
         !(logfiles[id].file = fopen(filename, "a"))) {
-      LOG(LOGS_WARN, LOGF_Refclock, "Couldn't open logfile %s for update", filename);
+      LOG(LOGS_WARN, LOGF_Logging, "Could not open log file %s", filename);
       logfiles[id].name = NULL;
       return;
     }
diff --git a/main.c b/main.c
index ba379259d0a69ab86d4efa16b9b9486e1c7a96b0..71916faa927e20f0043c2fbbf92ca00f69fb0327 100644 (file)
--- a/main.c
+++ b/main.c
@@ -297,14 +297,14 @@ go_daemon(void)
   /* Create pipe which will the daemon use to notify the grandparent
      when it's initialised or send an error message */
   if (pipe(pipefd)) {
-    LOG_FATAL(LOGF_Logging, "Could not detach, pipe failed : %s", strerror(errno));
+    LOG_FATAL(LOGF_Main, "Could not detach, pipe failed : %s", strerror(errno));
   }
 
   /* Does this preserve existing signal handlers? */
   pid = fork();
 
   if (pid < 0) {
-    LOG_FATAL(LOGF_Logging, "Could not detach, fork failed : %s", strerror(errno));
+    LOG_FATAL(LOGF_Main, "Could not detach, fork failed : %s", strerror(errno));
   } else if (pid > 0) {
     /* In the 'grandparent' */
     char message[1024];
@@ -329,7 +329,7 @@ go_daemon(void)
     pid = fork();
 
     if (pid < 0) {
-      LOG_FATAL(LOGF_Logging, "Could not detach, fork failed : %s", strerror(errno));
+      LOG_FATAL(LOGF_Main, "Could not detach, fork failed : %s", strerror(errno));
     } else if (pid > 0) {
       exit(0); /* In the 'parent' */
     } else {
@@ -337,7 +337,7 @@ go_daemon(void)
 
       /* Change current directory to / */
       if (chdir("/") < 0) {
-        LOG_FATAL(LOGF_Logging, "Could not chdir to / : %s", strerror(errno));
+        LOG_FATAL(LOGF_Main, "Could not chdir to / : %s", strerror(errno));
       }
 
       /* Don't keep stdin/out/err from before. But don't close
index 293a711b05f27af7690ce5fd90c177b59886c5ae..555fa24e5b1e5834585846017d21be9bb3135a03 100644 (file)
@@ -135,7 +135,7 @@ read_points(const char *filename)
   while (fgets(line, sizeof (line), f)) {
     p = (struct Point *)ARR_GetNewElement(points);
     if (sscanf(line, "%lf %lf", &p->temp, &p->comp) != 2) {
-      LOG_FATAL(LOGF_Configure, "Could not read tempcomp point from %s", filename);
+      LOG_FATAL(LOGF_TempComp, "Could not read tempcomp point from %s", filename);
       break;
     }
   }
@@ -143,7 +143,7 @@ read_points(const char *filename)
   fclose(f);
 
   if (ARR_GetSize(points) < 2)
-    LOG_FATAL(LOGF_Configure, "Not enough points in %s", filename);
+    LOG_FATAL(LOGF_TempComp, "Not enough points in %s", filename);
 }
 
 void