summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-01-16 17:04:24 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-01-16 17:04:24 +0100
commit2181f1e16d2c235ffb117e3d0f7c73589b82197d (patch)
treeae5155bc300adf343862aa96d5de7099c9e663a0
parentdd85d760da00cca96d92928c7c7f137e1dc8a0ad (diff)
downloadrvnit-2181f1e16d2c235ffb117e3d0f7c73589b82197d.tar.gz
rvnit-2181f1e16d2c235ffb117e3d0f7c73589b82197d.tar.xz
rvnit-2181f1e16d2c235ffb117e3d0f7c73589b82197d.zip
always log into globallogfd
This ensures we have complete logs when the global logger starts
(as long as it fits into a pipe buffer).
-rw-r--r--rvnit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/rvnit.c b/rvnit.c
index 5d5d24f..933be5f 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -433,13 +433,10 @@ logger_loop(void* ignored)
 				if (!eol)
 					eol = e;
 
-				int r = 0;
-				if (use_global_log) {
-					r = dprintf(globallogfd[1],
-					    "%s.%05ld %s[%ld]: %.*s\n",
-					    timestamp, now.tv_nsec / 10000,
-					    sv, pid, (int)(eol - s), s);
-				}
+				int r = dprintf(globallogfd[1],
+				    "%s.%05ld %s[%ld]: %.*s\n",
+				    timestamp, now.tv_nsec / 10000,
+				    sv, pid, (int)(eol - s), s);
 				if (!use_global_log || pass_thru || r < 0) {
 					/* print own messages, and messages
 					   during boot/shutdown, or when writing