commit ad96092405729e8d71d542ab45d6021d72bdeb0f
parent a25242b5742ffb355c6f029873522a090ec6981a
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Sun, 1 Oct 2023 14:44:23 -0700
Add newline to stderr log entries
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/aps/log.c b/aps/log.c
@@ -124,7 +124,10 @@ aps_log(struct aps *aps, int fd, int level, char *subject, char *fmt, ...)
va_start(ap, fmt);
if (aps && aps->syslog)
vsyslog(level, buf, ap);
- else
+ else {
+ newbuflen(sizeof(buf), &len,
+ strlcpy(buf + len, "\n", sizeof(buf) - len), "newline");
vfprintf(stderr, buf, ap);
+ }
va_end(ap);
}