return;
}
- log_debug("Failed to forward syslog message: %m");
+ if (errno != ENOENT)
+ log_debug("Failed to forward syslog message: %m");
}
static void forward_syslog_raw(Server *s, int priority, const char *buffer, struct ucred *ucred, struct timeval *tv) {
u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U);
c = realloc(iovec, u * sizeof(struct iovec));
if (!c) {
- log_error("Out of memory");
+ log_error("Out of memory.");
break;
}
k = malloc((e - p) + 1 + l);
if (!k) {
- log_error("Out of memory");
+ log_error("Out of memory.");
break;
}
p = malloc(st.st_size);
if (!p) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return;
}
else {
s->identifier = strdup(p);
if (!s->identifier) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
}
else {
s->unit_id = strdup(p);
if (!s->unit_id) {
- log_error("Out of memory");
+ log_error("Out of memory.");
return -ENOMEM;
}
}
journal_file_close(s->runtime_journal);
s->runtime_journal = NULL;
- if (r >= 0) {
- char path[] = "/run/log/journal/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
- sd_id128_to_string(machine, path + 17);
- rm_rf(path, false, true, false);
- }
+ if (r >= 0)
+ rm_rf("/run/log/journal", false, true, false);
return r;
}
return -errno;
}
+ log_info("Received SIG%s", signal_to_string(sfsi.ssi_signo));
+
if (sfsi.ssi_signo == SIGUSR1) {
touch("/run/systemd/journal/flushed");
server_flush_to_var(s);
return 1;
}
- log_debug("Received SIG%s", signal_to_string(sfsi.ssi_signo));
return 0;
} else if (ev->data.fd == s->proc_kmsg_fd) {