diff options
Diffstat (limited to 'src/http/modules/ngx_http_log_handler.c')
| -rw-r--r-- | src/http/modules/ngx_http_log_handler.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/http/modules/ngx_http_log_handler.c b/src/http/modules/ngx_http_log_handler.c index 4937ed0b8..b2f0e0d54 100644 --- a/src/http/modules/ngx_http_log_handler.c +++ b/src/http/modules/ngx_http_log_handler.c @@ -32,8 +32,6 @@ int ngx_http_log_handler(ngx_http_request_t *r) len += r->connection->addr_text.len; len += r->request_line.len; - ngx_log_debug(r->connection->log, "log handler: %d" _ len); - ngx_test_null(line, ngx_palloc(r->pool, len), NGX_ERROR); p = line; @@ -46,13 +44,8 @@ int ngx_http_log_handler(ngx_http_request_t *r) *p++ = ' '; - *p = '\0'; - ngx_log_debug(r->connection->log, "log handler: %s" _ line); - ngx_localtime(&tm); - ngx_log_debug(r->connection->log, "log handler: %s" _ line); - *p++ = '['; p += ngx_snprintf(p, 21, "%02d/%s/%d:%02d:%02d:%02d", tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], @@ -63,9 +56,6 @@ int ngx_http_log_handler(ngx_http_request_t *r) *p++ = ' '; - *p = '\0'; - ngx_log_debug(r->connection->log, "log handler: %s" _ line); - *p++ = '"'; ngx_memcpy(p, r->request_line.data, r->request_line.len); p += r->request_line.len; @@ -79,19 +69,13 @@ int ngx_http_log_handler(ngx_http_request_t *r) p += ngx_snprintf(p, 21, QD_FMT, r->connection->sent); - *p = '\0'; - ngx_log_debug(r->connection->log, "log handler: %s" _ line); - #if (WIN32) *p++ = CR; *p++ = LF; #else *p++ = LF; #endif - *p = '\0'; - ngx_log_debug(r->connection->log, "log handler: %s" _ line); - - write(1, line, len); + write(1, line, p - line); return NGX_OK; } |
