From b511c42939575cee22430ccb4089cca256648246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Tue, 19 Aug 2008 16:41:49 +0000 Subject: [PATCH] Replaced fprintf with log_error_write in mod-fastcgi git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2287 152afb58-edef-0310-8abb-c4023f1b3aa9 --- NEWS | 1 + src/mod_fastcgi.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index dca7d994..8cb8f0fc 100644 --- a/NEWS +++ b/NEWS @@ -54,6 +54,7 @@ NEWS * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server) * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1" * fixed format string bugs in mod_accesslog for SYSLOG + * replaced fprintf with log_error_write in fastcgi debug - 1.4.19 - 2008-03-10 diff --git a/src/mod_fastcgi.c b/src/mod_fastcgi.c index 77212b96..4a705393 100644 --- a/src/mod_fastcgi.c +++ b/src/mod_fastcgi.c @@ -2119,12 +2119,12 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) { hctx->wb->bytes_in += sizeof(header); if (p->conf.debug > 10) { - fprintf(stderr, "%s.%d: tosend: %lld / %lld\n", __FILE__, __LINE__, offset, req_cq->bytes_in); + log_error_write(srv, __FILE__, __LINE__, "soso", "tosend:", offset, "/", req_cq->bytes_in); } for (written = 0; written != weWant; ) { if (p->conf.debug > 10) { - fprintf(stderr, "%s.%d: chunk: %lld / %lld\n", __FILE__, __LINE__, written, weWant); + log_error_write(srv, __FILE__, __LINE__, "soso", "chunk:", written, "/", weWant); } switch (req_c->type) { @@ -2134,12 +2134,10 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) { if (weHave > weWant - written) weHave = weWant - written; if (p->conf.debug > 10) { - fprintf(stderr, "%s.%d: sending %lld bytes from (%lld / %lld) %s\n", - __FILE__, __LINE__, - weHave, - req_c->offset, - req_c->file.length, - req_c->file.name->ptr); + log_error_write(srv, __FILE__, __LINE__, "soSosOsb", + "sending", weHave, "bytes from (", + req_c->offset, "/", req_c->file.length, ")", + req_c->file.name); } assert(weHave != 0); @@ -2168,7 +2166,7 @@ static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) { chunk *c; if (p->conf.debug > 10) { - fprintf(stderr, "%s.%d: next chunk\n", __FILE__, __LINE__); + log_error_write(srv, __FILE__, __LINE__, "s", "next chunk"); } c = hctx->wb->last;