Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_log.c @ 604:428c6e58046a NGINX_0_9_0
nginx 0.9.0
*) Feature: the "keepalive_disable" directive.
*) Feature: the "map" directive supports variables as value of a
defined variable.
*) Feature: the "map" directive supports empty strings as value of the
first parameter.
*) Feature: the "map" directive supports expressions as the first
parameter.
*) Feature: nginx(8) manual page.
Thanks to Sergey Osokin.
*) Feature: Linux accept4() support.
Thanks to Simon Liu.
*) Workaround: elimination of Linux linker warning about "sys_errlist"
and "sys_nerr"; the warning had appeared in 0.8.35.
*) Bugfix: a segmentation fault might occur in a worker process, if the
"auth_basic" directive was used.
Thanks to Michail Laletin.
*) Bugfix: compatibility with ngx_http_eval_module; the bug had
appeared in 0.8.42.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 29 Nov 2010 00:00:00 +0300 |
parents | 8246d8a2c2be |
children | 7ea1bba9a4f6 |
comparison
equal
deleted
inserted
replaced
603:94ea26a3b3aa | 604:428c6e58046a |
---|---|
146 || log->file->fd == ngx_stderr) | 146 || log->file->fd == ngx_stderr) |
147 { | 147 { |
148 return; | 148 return; |
149 } | 149 } |
150 | 150 |
151 msg -= (err_levels[level].len + 4); | 151 msg -= (7 + err_levels[level].len + 4); |
152 | 152 |
153 (void) ngx_sprintf(msg, "[%V]: ", &err_levels[level]); | 153 (void) ngx_sprintf(msg, "nginx: [%V]: ", &err_levels[level]); |
154 | 154 |
155 (void) ngx_write_console(ngx_stderr, msg, p - msg); | 155 (void) ngx_write_console(ngx_stderr, msg, p - msg); |
156 } | 156 } |
157 | 157 |
158 | 158 |
207 u_char *p, *last; | 207 u_char *p, *last; |
208 va_list args; | 208 va_list args; |
209 u_char errstr[NGX_MAX_ERROR_STR]; | 209 u_char errstr[NGX_MAX_ERROR_STR]; |
210 | 210 |
211 last = errstr + NGX_MAX_ERROR_STR; | 211 last = errstr + NGX_MAX_ERROR_STR; |
212 p = errstr + 7; | |
213 | |
214 ngx_memcpy(errstr, "nginx: ", 7); | |
212 | 215 |
213 va_start(args, fmt); | 216 va_start(args, fmt); |
214 p = ngx_vslprintf(errstr, last, fmt, args); | 217 p = ngx_vslprintf(p, last, fmt, args); |
215 va_end(args); | 218 va_end(args); |
216 | 219 |
217 if (err) { | 220 if (err) { |
218 p = ngx_log_errno(p, last, err); | 221 p = ngx_log_errno(p, last, err); |
219 } | 222 } |
246 ? " (%d: " : " (%Xd: ", err); | 249 ? " (%d: " : " (%Xd: ", err); |
247 #else | 250 #else |
248 buf = ngx_slprintf(buf, last, " (%d: ", err); | 251 buf = ngx_slprintf(buf, last, " (%d: ", err); |
249 #endif | 252 #endif |
250 | 253 |
251 buf = ngx_strerror_r(err, buf, last - buf); | 254 buf = ngx_strerror(err, buf, last - buf); |
252 | 255 |
253 if (buf < last) { | 256 if (buf < last) { |
254 *buf++ = ')'; | 257 *buf++ = ')'; |
255 } | 258 } |
256 | 259 |