diff --git a/logging.c b/logging.c index 35562c0..e09203a 100644 --- 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 ba37925..71916fa 100644 --- 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 diff --git a/tempcomp.c b/tempcomp.c index 293a711..555fa24 100644 --- a/tempcomp.c +++ b/tempcomp.c @@ -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