use correct facility in LOG messages
This commit is contained in:
parent
a06a5f1baa
commit
c08e7e716d
3 changed files with 7 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
|
8
main.c
8
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue