diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-06 11:46:40 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-06 11:46:40 +0000 |
commit | eae52ad493f582222b4f2b748c0043c42bb851cb (patch) | |
tree | 0cc9aa41b31d831984e39cb2b14ab2cc05a0f83d /fcgi.c | |
parent | 58fae4ea901aed6b093c5a336eb09abe6efe5880 (diff) |
switch to the more usual log.c
Diffstat (limited to 'fcgi.c')
-rw-r--r-- | fcgi.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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) |