Commit Diff


commit - 9ffdade26c5a3075484c5a44f27f225bf87efb85
commit + 2b5e2a5f04b4447a13b5468f6bdfe133a91b8063
blob - e67ae7c2f4b206da17a4898a6f034ba19a9717ee
blob + 8ce6d6d18ae8408b8172d037dde09fd310a8b487
--- log.c
+++ log.c
@@ -78,9 +78,9 @@ should_log(int priority)
 }
 
 static inline void
-send_log(int priority, const char *msg, size_t len)
+send_log(int type, int priority, const char *msg, size_t len)
 {
-	imsg_compose(&logibuf, IMSG_LOG, priority, 0, -1, msg, len);
+	imsg_compose(&logibuf, type, priority, 0, -1, msg, len);
 	imsg_flush(&logibuf);
 }
 
@@ -94,7 +94,7 @@ fatal(const char *fmt, ...)
 
 	va_start(ap, fmt);
 	if ((r = vasprintf(&fmted, fmt, ap)) != -1) {
-		send_log(LOG_CRIT, fmted, r+1);
+		send_log(LOG_CRIT, IMSG_LOG, fmted, r+1);
 		free(fmted);
 
 		/* wait for the logger process to shut down */
@@ -139,7 +139,7 @@ vlog(int priority, struct client *c,
 	if (ec < 0)
 		fatal("asprintf: %s", strerror(errno));
 
-	send_log(priority, s, ec+1);
+	send_log(priority, IMSG_LOG, s, ec+1);
 
 	free(fmted);
 	free(s);
@@ -252,7 +252,7 @@ log_request(struct client *c, char *meta, size_t l)
 	    (int)(t-meta), meta);
 	if (ec < 0)
 		err(1, "asprintf");
-	send_log(LOG_NOTICE, fmted, ec+1);
+	send_log(LOG_NOTICE, IMSG_LOG, fmted, ec+1);
 	free(fmted);
 }