summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_log_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-12-19 07:08:55 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-12-19 07:08:55 +0000
commit8809257531cc21aab3a25bb487e9424175cdfddd (patch)
tree42efffb011487a9e62014a7aee1607d51f233dd6 /src/http/modules/ngx_http_log_handler.c
parent140464d638353addea305e73d247ca6711f668aa (diff)
downloadnginx-8809257531cc21aab3a25bb487e9424175cdfddd.tar.gz
nginx-8809257531cc21aab3a25bb487e9424175cdfddd.tar.bz2
nginx-0.0.1-2002-12-19-10:08:55 import
Diffstat (limited to 'src/http/modules/ngx_http_log_handler.c')
-rw-r--r--src/http/modules/ngx_http_log_handler.c18
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;
}