[nginx] Format specifier fixes in error logging.
Sergey Kandaurov
pluknet at nginx.com
Tue Aug 20 16:51:37 UTC 2013
details: http://hg.nginx.org/nginx/rev/6b479db5b52b
branches:
changeset: 5327:6b479db5b52b
user: Sergey Kandaurov <pluknet at nginx.com>
date: Tue Aug 20 20:47:16 2013 +0400
description:
Format specifier fixes in error logging.
diffstat:
src/core/ngx_open_file_cache.c | 2 +-
src/event/modules/ngx_devpoll_module.c | 4 ++--
src/http/ngx_http_special_response.c | 2 +-
src/http/ngx_http_variables.c | 2 +-
src/os/unix/ngx_channel.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diffs (69 lines):
diff -r d22eb224aedf -r 6b479db5b52b src/core/ngx_open_file_cache.c
--- a/src/core/ngx_open_file_cache.c Sat Aug 17 16:54:55 2013 +0400
+++ b/src/core/ngx_open_file_cache.c Tue Aug 20 20:47:16 2013 +0400
@@ -124,7 +124,7 @@ ngx_open_file_cache_cleanup(void *data)
if (cache->current) {
ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0,
- "%d items still leave in open file cache",
+ "%ui items still leave in open file cache",
cache->current);
}
diff -r d22eb224aedf -r 6b479db5b52b src/event/modules/ngx_devpoll_module.c
--- a/src/event/modules/ngx_devpoll_module.c Sat Aug 17 16:54:55 2013 +0400
+++ b/src/event/modules/ngx_devpoll_module.c Tue Aug 20 20:47:16 2013 +0400
@@ -425,7 +425,7 @@ ngx_devpoll_process_events(ngx_cycle_t *
case -1:
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
- "ioctl(DP_ISPOLLED) failed for socket %d, event",
+ "ioctl(DP_ISPOLLED) failed for socket %d, event %04Xd",
fd, revents);
break;
@@ -449,7 +449,7 @@ ngx_devpoll_process_events(ngx_cycle_t *
!= (ssize_t) sizeof(struct pollfd))
{
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
- "write(/dev/poll) for %d failed, fd");
+ "write(/dev/poll) for %d failed", fd);
}
if (close(fd) == -1) {
diff -r d22eb224aedf -r 6b479db5b52b src/http/ngx_http_special_response.c
--- a/src/http/ngx_http_special_response.c Sat Aug 17 16:54:55 2013 +0400
+++ b/src/http/ngx_http_special_response.c Tue Aug 20 20:47:16 2013 +0400
@@ -370,7 +370,7 @@ ngx_http_special_response_handler(ngx_ht
ngx_http_core_loc_conf_t *clcf;
ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http special response: %d, \"%V?%V\"",
+ "http special response: %i, \"%V?%V\"",
error, &r->uri, &r->args);
r->err_status = error;
diff -r d22eb224aedf -r 6b479db5b52b src/http/ngx_http_variables.c
--- a/src/http/ngx_http_variables.c Sat Aug 17 16:54:55 2013 +0400
+++ b/src/http/ngx_http_variables.c Tue Aug 20 20:47:16 2013 +0400
@@ -487,7 +487,7 @@ ngx_http_get_indexed_variable(ngx_http_r
if (cmcf->variables.nelts <= index) {
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
- "unknown variable index: %d", index);
+ "unknown variable index: %ui", index);
return NULL;
}
diff -r d22eb224aedf -r 6b479db5b52b src/os/unix/ngx_channel.c
--- a/src/os/unix/ngx_channel.c Sat Aug 17 16:54:55 2013 +0400
+++ b/src/os/unix/ngx_channel.c Tue Aug 20 20:47:16 2013 +0400
@@ -144,7 +144,7 @@ ngx_read_channel(ngx_socket_t s, ngx_cha
if ((size_t) n < sizeof(ngx_channel_t)) {
ngx_log_error(NGX_LOG_ALERT, log, 0,
- "recvmsg() returned not enough data: %uz", n);
+ "recvmsg() returned not enough data: %z", n);
return NGX_ERROR;
}
More information about the nginx-devel
mailing list