aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-08-23 22:36:01 +0000
committerOmar Polo <op@omarpolo.com>2021-08-23 22:36:01 +0000
commitef352ec3b87210945429d033625bbfb06de4d7c4 (patch)
tree4e12070547f0dd5f0c895244205b933df4ae5b09
parent03747a6c5101855b4d9db42f27e696f26ba2484d (diff)
fix wrong arguments order for send_log
-rw-r--r--log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/log.c b/log.c
index 6f73c8f..404d43f 100644
--- a/log.c
+++ b/log.c
@@ -95,7 +95,7 @@ fatal(const char *fmt, ...)
va_start(ap, fmt);
if ((r = vasprintf(&fmted, fmt, ap)) != -1) {
- send_log(LOG_CRIT, IMSG_LOG, fmted, r+1);
+ send_log(IMSG_LOG, LOG_CRIT, fmted, r+1);
free(fmted);
/* wait for the logger process to shut down */
@@ -140,7 +140,7 @@ vlog(int priority, struct client *c,
if (ec < 0)
fatal("asprintf: %s", strerror(errno));
- send_log(priority, IMSG_LOG, s, ec+1);
+ send_log(IMSG_LOG, priority, s, ec+1);
free(fmted);
free(s);
@@ -253,7 +253,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, IMSG_LOG_REQUEST, fmted, ec+1);
+ send_log(IMSG_LOG_REQUEST, LOG_NOTICE, fmted, ec+1);
free(fmted);
}