comparison src/http/modules/ngx_http_log_handler.c @ 65:4222c496acb3

nginx-0.0.1-2003-03-05-09:37:42 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 05 Mar 2003 06:37:42 +0000
parents b2e039840718
children e43f406e4525
comparison
equal deleted inserted replaced
64:34d647deb1da 65:4222c496acb3
20 char *line, *p; 20 char *line, *p;
21 ngx_tm_t tm; 21 ngx_tm_t tm;
22 22
23 ngx_log_debug(r->connection->log, "log handler"); 23 ngx_log_debug(r->connection->log, "log handler");
24 24
25 /* 10:%con, 22:%date, 2:%"%r", 3:%status, 20:%bytes, 5*" ", 2/1: "\r\n" */ 25 /* 10:%con, 1:%pipe, 22:%date, 2:"%r", 3:%status, 20:%bytes,
26 6*" ", 2/1: "\r\n" */
26 #if (WIN32) 27 #if (WIN32)
27 len = 10 + 22 + 2 + 3 + 20 + 5 + 2; 28 len = 10 + 1 + 22 + 2 + 3 + 20 + 6 + 2;
28 #else 29 #else
29 len = 10 + 22 + 2 + 3 + 20 + 5 + 1; 30 len = 10 + 1 + 22 + 2 + 3 + 20 + 6 + 1;
30 #endif 31 #endif
31 32
32 len += r->connection->addr_text.len; 33 len += r->connection->addr_text.len;
33 len += r->request_line.len; 34 len += r->request_line.len;
34 35
39 p += r->connection->addr_text.len; 40 p += r->connection->addr_text.len;
40 41
41 *p++ = ' '; 42 *p++ = ' ';
42 43
43 p += ngx_snprintf(p, 21, "%u", r->connection->number); 44 p += ngx_snprintf(p, 21, "%u", r->connection->number);
45
46 *p++ = ' ';
47
48 if (r->pipeline) {
49 *p++ = 'p';
50 } else {
51 *p++ = '.';
52 }
44 53
45 *p++ = ' '; 54 *p++ = ' ';
46 55
47 ngx_localtime(&tm); 56 ngx_localtime(&tm);
48 57