Mercurial > hg > nginx
comparison src/os/win32/ngx_event_log.c @ 2765:6d358aeaa989
ngx_log_errno()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 27 Apr 2009 13:17:33 +0000 |
parents | d4a717592877 |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
2764:d4a717592877 | 2765:6d358aeaa989 |
---|---|
31 va_start(args, fmt); | 31 va_start(args, fmt); |
32 p = ngx_vslprintf(p, last, fmt, args); | 32 p = ngx_vslprintf(p, last, fmt, args); |
33 va_end(args); | 33 va_end(args); |
34 | 34 |
35 if (err) { | 35 if (err) { |
36 | 36 p = ngx_log_errno(p, last, err); |
37 if (p > last - 50) { | |
38 | |
39 /* leave a space for an error code */ | |
40 | |
41 p = last - 50; | |
42 *p++ = '.'; | |
43 *p++ = '.'; | |
44 *p++ = '.'; | |
45 } | |
46 | |
47 p = ngx_slprintf(p, last, ((unsigned) err < 0x80000000) | |
48 ? " (%d: " : " (%Xd: ", err); | |
49 p = ngx_strerror_r(err, p, last - p); | |
50 | |
51 if (p < last) { | |
52 *p++ = ')'; | |
53 } | |
54 } | 37 } |
55 | 38 |
56 if (p > last - NGX_LINEFEED_SIZE - 1) { | 39 if (p > last - NGX_LINEFEED_SIZE - 1) { |
57 p = last - NGX_LINEFEED_SIZE - 1; | 40 p = last - NGX_LINEFEED_SIZE - 1; |
58 } | 41 } |