aboutsummaryrefslogtreecommitdiff
path: root/fcgi.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-06 11:46:40 +0000
committerOmar Polo <op@omarpolo.com>2023-06-06 11:46:40 +0000
commiteae52ad493f582222b4f2b748c0043c42bb851cb (patch)
tree0cc9aa41b31d831984e39cb2b14ab2cc05a0f83d /fcgi.c
parent58fae4ea901aed6b093c5a336eb09abe6efe5880 (diff)
switch to the more usual log.c
Diffstat (limited to 'fcgi.c')
-rw-r--r--fcgi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fcgi.c b/fcgi.c
index c67b1ac..553211e 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -20,7 +20,7 @@
#include <errno.h>
#include <string.h>
-#include "logger.h"
+#include "log.h"
/*
* Sometimes it can be useful to inspect the fastcgi traffic as
@@ -262,8 +262,7 @@ fcgi_read(struct bufferevent *bev, void *d)
memcpy(&hdr, EVBUFFER_DATA(src), sizeof(hdr));
if (recid(&hdr) != 1) {
- log_err(NULL,
- "got invalid client id %d from fcgi backend",
+ log_warnx("got invalid client id %d from fcgi backend",
recid(&hdr));
goto err;
}
@@ -283,8 +282,8 @@ fcgi_read(struct bufferevent *bev, void *d)
switch (hdr.type) {
case FCGI_END_REQUEST:
if (len != sizeof(end)) {
- log_err(NULL,
- "got invalid end request record size");
+ log_warnx("got invalid end request"
+ " record size");
goto err;
}
bufferevent_read(bev, &end, sizeof(end));
@@ -305,7 +304,7 @@ fcgi_read(struct bufferevent *bev, void *d)
break;
default:
- log_err(NULL, "got invalid fcgi record (type=%d)",
+ log_warnx("got invalid fcgi record (type=%d)",
hdr.type);
goto err;
}
@@ -332,8 +331,7 @@ fcgi_error(struct bufferevent *bev, short err, void *d)
struct client *c = d;
if (!(err & (EVBUFFER_ERROR|EVBUFFER_EOF)))
- log_warn(NULL, "unknown event error (%x): %s",
- err, strerror(errno));
+ log_warn("unknown event error (%x)", err);
c->type = REQUEST_DONE;
if (c->code != 0)