]> git.kaiwu.me - nginx.git/commitdiff
Fixed logging.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 30 Mar 2016 23:33:57 +0000 (02:33 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 30 Mar 2016 23:33:57 +0000 (02:33 +0300)
39 files changed:
src/core/nginx.c
src/core/ngx_cycle.c
src/core/ngx_file.c
src/core/ngx_slab.c
src/event/modules/ngx_epoll_module.c
src/event/ngx_event.c
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl_stapling.c
src/event/ngx_event_pipe.c
src/http/modules/ngx_http_auth_basic_module.c
src/http/modules/ngx_http_auth_request_module.c
src/http/modules/ngx_http_chunked_filter_module.c
src/http/modules/ngx_http_fastcgi_module.c
src/http/modules/ngx_http_gzip_filter_module.c
src/http/modules/ngx_http_image_filter_module.c
src/http/modules/ngx_http_limit_conn_module.c
src/http/modules/ngx_http_map_module.c
src/http/modules/ngx_http_memcached_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_range_filter_module.c
src/http/modules/ngx_http_ssi_filter_module.c
src/http/modules/ngx_http_sub_filter_module.c
src/http/modules/ngx_http_upstream_ip_hash_module.c
src/http/ngx_http_request.c
src/http/ngx_http_script.c
src/http/ngx_http_write_filter_module.c
src/http/v2/ngx_http_v2.c
src/mail/ngx_mail_auth_http_module.c
src/mail/ngx_mail_proxy_module.c
src/os/unix/ngx_file_aio_read.c
src/os/unix/ngx_files.c
src/os/unix/ngx_linux_aio_read.c
src/os/unix/ngx_linux_sendfile_chain.c
src/os/unix/ngx_process_cycle.c
src/os/unix/ngx_readv_chain.c
src/os/unix/ngx_recv.c
src/os/unix/ngx_send.c
src/os/unix/ngx_udp_recv.c
src/stream/ngx_stream_limit_conn_module.c

index 28231697c30fbf938d8d3f3be2008bf8b1772861..e69acb57126b9a1ee6bff613f66b4f66b940d488 100644 (file)
@@ -1510,7 +1510,7 @@ ngx_load_module(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             return NGX_CONF_ERROR;
         }
 
-        ngx_log_debug2(NGX_LOG_DEBUG_CORE, cf->log, 0, "module: %s i:%i",
+        ngx_log_debug2(NGX_LOG_DEBUG_CORE, cf->log, 0, "module: %s i:%ui",
                        module->name, module->index);
     }
 
index 5785eb5b54d26bd1c15f3f40566a0fef35a3fa94..87cb62ed049b339857344080cb407a13e539e99e 100644 (file)
@@ -1313,7 +1313,7 @@ ngx_clean_old_cycles(ngx_event_t *ev)
             if (cycle[i]->connections[n].fd != (ngx_socket_t) -1) {
                 found = 1;
 
-                ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "live fd:%d", n);
+                ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "live fd:%ui", n);
 
                 break;
             }
@@ -1324,13 +1324,13 @@ ngx_clean_old_cycles(ngx_event_t *ev)
             continue;
         }
 
-        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "clean old cycle: %d", i);
+        ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "clean old cycle: %ui", i);
 
         ngx_destroy_pool(cycle[i]->pool);
         cycle[i] = NULL;
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "old cycles status: %d", live);
+    ngx_log_debug1(NGX_LOG_DEBUG_CORE, log, 0, "old cycles status: %ui", live);
 
     if (live) {
         ngx_add_timer(ev, 30000);
index 6c16e205690bed2de965a80e63ee7fdb59bef75f..fc2dfd3221396b59ee1a4fe11068f6c13b7e5aec 100644 (file)
@@ -841,7 +841,7 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
 
         if ((size_t) n != len) {
             ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
-                          ngx_read_fd_n " has read only %z of %uz from %s",
+                          ngx_read_fd_n " has read only %z of %O from %s",
                           n, size, from);
             goto failed;
         }
@@ -856,7 +856,7 @@ ngx_copy_file(u_char *from, u_char *to, ngx_copy_file_t *cf)
 
         if ((size_t) n != len) {
             ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
-                          ngx_write_fd_n " has written only %z of %uz to %s",
+                          ngx_write_fd_n " has written only %z of %O to %s",
                           n, size, to);
             goto failed;
         }
index fa2a646372c1e3b853b324babcc1c0799fffb5d4..56e7765c0f36572fe706397489989471406beec0 100644 (file)
@@ -392,7 +392,8 @@ ngx_slab_alloc_locked(ngx_slab_pool_t *pool, size_t size)
 
 done:
 
-    ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, ngx_cycle->log, 0, "slab alloc: %p", p);
+    ngx_log_debug1(NGX_LOG_DEBUG_ALLOC, ngx_cycle->log, 0,
+                   "slab alloc: %p", (void *) p);
 
     return (void *) p;
 }
index 081b0e55093aa9081a841dfd63e5fe4868604fc2..828e4d177fc7b294bedf03b85fbc0a3ce783776c 100644 (file)
@@ -902,7 +902,7 @@ ngx_epoll_eventfd_handler(ngx_event_t *ev)
         events = io_getevents(ngx_aio_ctx, 1, 64, event, &ts);
 
         ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                       "io_getevents: %l", events);
+                       "io_getevents: %d", events);
 
         if (events > 0) {
             ready -= events;
index 38f9b3899a8714fea8b1521de14eaf9e2d442246..c8ae5b2cf9ef4040e6d0b182b49464dc96074cc2 100644 (file)
@@ -525,7 +525,7 @@ ngx_event_module_init(ngx_cycle_t *cycle)
     (void) ngx_atomic_cmp_set(ngx_connection_counter, 0, 1);
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
-                   "counter: %p, %d",
+                   "counter: %p, %uA",
                    ngx_connection_counter, *ngx_connection_counter);
 
     ngx_temp_number = (ngx_atomic_t *) (shared + 2 * cl);
index 59534c6a7ae3eb742ede64444c33ad3049402d4c..743928f78ab0f7a4dc8ff1e5ced1091bc907f993 100644 (file)
@@ -1596,7 +1596,7 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
             }
 
             ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                           "SSL buf copy: %d", size);
+                           "SSL buf copy: %z", size);
 
             ngx_memcpy(buf->last, in->buf->pos, size);
 
@@ -1668,7 +1668,7 @@ ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
 
     ngx_ssl_clear_error(c->log);
 
-    ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL to write: %d", size);
+    ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "SSL to write: %uz", size);
 
     n = SSL_write(c->ssl->connection, data, size);
 
index fa776782c63debb7afedf29c07e08f94b282e206..3f2351c56cd6853778a84d1e4474223538ff9242 100644 (file)
@@ -1219,7 +1219,7 @@ ngx_ssl_ocsp_create_request(ngx_ssl_ocsp_ctx_t *ctx)
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ctx->log, 0,
                    "ssl ocsp request length %z, escape %d",
-                   base64.len, escape);
+                   base64.len, (int) escape);
 
     len = sizeof("GET ") - 1 + ctx->uri.len + sizeof("/") - 1
           + base64.len + 2 * escape + sizeof(" HTTP/1.0" CRLF) - 1
index 795688c8d2115d2b8f51cb20eb29adf329b44858..5ce59ae09fd5a0ee6f8d41f0bef1cca0a269378d 100644 (file)
@@ -660,7 +660,7 @@ ngx_event_pipe_write_to_downstream(ngx_event_pipe_t *p)
     flush:
 
         ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0,
-                       "pipe write: out:%p, f:%d", out, flush);
+                       "pipe write: out:%p, f:%ui", out, flush);
 
         if (out == NULL) {
 
index 8ec53295fba4ec203b4dce67a662fecdf686f217..1e7a0c2df8d9d07ebb1d8504cb17d34a006acf87 100644 (file)
@@ -298,7 +298,7 @@ ngx_http_auth_basic_crypt_handler(ngx_http_request_t *r,
                    &encrypted);
 
     ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "rc: %d user: \"%V\" salt: \"%s\"",
+                   "rc: %i user: \"%V\" salt: \"%s\"",
                    rc, &r->headers_in.user, passwd->data);
 
     if (rc == NGX_OK) {
index b4307be2e7d53fb5eb7aa1c850ecb86c7f3f6c48..bab79e4961a755f2c61079ea4a18a1155a393e12 100644 (file)
@@ -168,7 +168,7 @@ ngx_http_auth_request_handler(ngx_http_request_t *r)
         }
 
         ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
-                      "auth request unexpected status: %d", ctx->status);
+                      "auth request unexpected status: %ui", ctx->status);
 
         return NGX_HTTP_INTERNAL_SERVER_ERROR;
     }
@@ -219,7 +219,7 @@ ngx_http_auth_request_done(ngx_http_request_t *r, void *data, ngx_int_t rc)
     ngx_http_auth_request_ctx_t   *ctx = data;
 
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "auth request done s:%d", r->headers_out.status);
+                   "auth request done s:%ui", r->headers_out.status);
 
     ctx->done = 1;
     ctx->status = r->headers_out.status;
index 0059a98d6ef6a1a8bf58a6635626b0fa466734ca..ac2e3e8f99acd99f2815ae28549b89fedea7685c 100644 (file)
@@ -121,7 +121,7 @@ ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
 
     for ( ;; ) {
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                       "http chunk: %d", ngx_buf_size(cl->buf));
+                       "http chunk: %O", ngx_buf_size(cl->buf));
 
         size += ngx_buf_size(cl->buf);
 
index 378f3fd648d2fa8e05ba94bdd10b0993cbe3e973..a86120377374a94bfcbb9e6ee2b5a142ea481289 100644 (file)
@@ -1653,7 +1653,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
                 && f->type != NGX_HTTP_FASTCGI_STDERR)
             {
                 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
-                              "upstream sent unexpected FastCGI record: %d",
+                              "upstream sent unexpected FastCGI record: %ui",
                               f->type);
 
                 return NGX_HTTP_UPSTREAM_INVALID_HEADER;
@@ -1834,7 +1834,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
             rc = ngx_http_parse_header_line(r, &u->buffer, 1);
 
             ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "http fastcgi parser: %d", rc);
+                           "http fastcgi parser: %i", rc);
 
             if (rc == NGX_AGAIN) {
                 break;
@@ -2505,7 +2505,7 @@ ngx_http_fastcgi_non_buffered_filter(void *data, ssize_t bytes)
 
         for (cl = u->out_bufs; cl; cl = cl->next) {
             ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "http fastcgi in memory %p-%p %uz",
+                           "http fastcgi in memory %p-%p %O",
                            cl->buf->pos, cl->buf->last, ngx_buf_size(cl->buf));
 
             if (buf->last == cl->buf->pos) {
index f941e639735c849d842a2b9d73720998d56bfbb9..536fdf8ad426c0aded1e6872372b838a7ecb89c0 100644 (file)
@@ -1009,14 +1009,14 @@ ngx_http_gzip_filter_alloc(void *opaque, u_int items, u_int size)
         ctx->allocated -= alloc;
 
         ngx_log_debug4(NGX_LOG_DEBUG_HTTP, ctx->request->connection->log, 0,
-                       "gzip alloc: n:%ud s:%ud a:%ud p:%p",
+                       "gzip alloc: n:%ud s:%ud a:%ui p:%p",
                        items, size, alloc, p);
 
         return p;
     }
 
     ngx_log_error(NGX_LOG_ALERT, ctx->request->connection->log, 0,
-                  "gzip filter failed to use preallocated memory: %ud of %ud",
+                  "gzip filter failed to use preallocated memory: %ud of %ui",
                   items * size, ctx->allocated);
 
     p = ngx_palloc(ctx->request->pool, items * size);
index e70b427f06aabdc1de8eb3d8fd7e958b20c08b57..b608de13f58d997bf642167f6cc92cb147050b00 100644 (file)
@@ -737,7 +737,7 @@ ngx_http_image_size(ngx_http_request_t *r, ngx_http_image_filter_ctx_t *ctx)
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "image size: %d x %d", width, height);
+                   "image size: %d x %d", (int) width, (int) height);
 
     ctx->width = width;
     ctx->height = height;
index 4379311ca83ee8f9cfdc0371f7d5adf00a9f3113..913d59934dd3a820aa36e2167ef698de01a83338 100644 (file)
@@ -232,7 +232,7 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r)
         }
 
         ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                       "limit conn: %08XD %d", node->key, lc->conn);
+                       "limit conn: %08Xi %d", node->key, lc->conn);
 
         ngx_shmtx_unlock(&shpool->mutex);
 
@@ -351,7 +351,7 @@ ngx_http_limit_conn_cleanup(void *data)
     ngx_shmtx_lock(&shpool->mutex);
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lccln->shm_zone->shm.log, 0,
-                   "limit conn cleanup: %08XD %d", node->key, lc->conn);
+                   "limit conn cleanup: %08Xi %d", node->key, lc->conn);
 
     lc->conn--;
 
index 2b80d0f1091e95473f938bb275762ee78dc09e34..091ff09e179080f113273e17a97ff94b35de8b0c 100644 (file)
@@ -141,7 +141,7 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v,
     *v = *value;
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http map: \"%v\" \"%v\"", &val, v);
+                   "http map: \"%V\" \"%v\"", &val, v);
 
     return NGX_OK;
 }
index 8341b92d3c07f6a80d31c92ee799548c7442e51c..d31996a8ecc655ba76709942f51ff3c7dd6ba1d4 100644 (file)
@@ -523,7 +523,7 @@ ngx_http_memcached_filter(void *data, ssize_t bytes)
     cl->buf->tag = u->output.tag;
 
     ngx_log_debug4(NGX_LOG_DEBUG_HTTP, ctx->request->connection->log, 0,
-                   "memcached filter bytes:%z size:%z length:%z rest:%z",
+                   "memcached filter bytes:%z size:%z length:%O rest:%z",
                    bytes, b->last - b->pos, u->length, ctx->rest);
 
     if (bytes <= (ssize_t) (u->length - NGX_HTTP_MEMCACHED_END)) {
index 5005b6bc35eea7d4c8649d54ece4ff817b86cb8a..c24ef170de5dd1e2843f30901492e1d2f82697f3 100644 (file)
@@ -1559,7 +1559,7 @@ ngx_http_proxy_body_output_filter(void *data, ngx_chain_t *in)
 
     for ( ;; ) {
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                       "proxy output chunk: %d", ngx_buf_size(cl->buf));
+                       "proxy output chunk: %O", ngx_buf_size(cl->buf));
 
         size += ngx_buf_size(cl->buf);
 
@@ -1917,7 +1917,7 @@ ngx_http_proxy_input_filter_init(void *data)
     }
 
     ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http proxy filter init s:%d h:%d c:%d l:%O",
+                   "http proxy filter init s:%ui h:%d c:%d l:%O",
                    u->headers_in.status_n, ctx->head, u->headers_in.chunked,
                    u->headers_in.content_length_n);
 
@@ -2125,7 +2125,7 @@ ngx_http_proxy_chunked_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http proxy chunked state %d, length %d",
+                   "http proxy chunked state %ui, length %O",
                    ctx->chunked.state, p->length);
 
     if (b) {
@@ -2299,7 +2299,7 @@ ngx_http_proxy_non_buffered_chunked_filter(void *data, ssize_t bytes)
 
         for (cl = u->out_bufs; cl; cl = cl->next) {
             ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "http proxy in memory %p-%p %uz",
+                           "http proxy in memory %p-%p %O",
                            cl->buf->pos, cl->buf->last, ngx_buf_size(cl->buf));
 
             if (buf->last == cl->buf->pos) {
index 55bb8ae9532652254ce5b98b67db3afccdcfafe6..57065e1a9e7d3f83512184e3dc66a0b3d70bf5e0 100644 (file)
@@ -207,7 +207,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r)
         if_range_time = ngx_parse_http_time(if_range->data, if_range->len);
 
         ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                       "http ir:%d lm:%d",
+                       "http ir:%T lm:%T",
                        if_range_time, r->headers_out.last_modified_time);
 
         if (if_range_time != r->headers_out.last_modified_time) {
index 8236320c2951647faa116e68d6c3fe13a6441311..b997aaa540ab2fccd7544ac8bc0f3e558c15c09f 100644 (file)
@@ -468,12 +468,12 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
         while (ctx->pos < ctx->buf->last) {
 
             ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "saved: %d state: %d", ctx->saved, ctx->state);
+                           "saved: %uz state: %ui", ctx->saved, ctx->state);
 
             rc = ngx_http_ssi_parse(r, ctx);
 
             ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "parse: %d, looked: %d %p-%p",
+                           "parse: %i, looked: %uz %p-%p",
                            rc, ctx->looked, ctx->copy_start, ctx->copy_end);
 
             if (rc == NGX_ERROR) {
@@ -485,7 +485,7 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
                 if (ctx->output) {
 
                     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                                   "saved: %d", ctx->saved);
+                                   "saved: %uz", ctx->saved);
 
                     if (ctx->saved) {
 
@@ -1911,7 +1911,7 @@ ngx_http_ssi_regex_match(ngx_http_request_t *r, ngx_str_t *pattern,
 
     if (rc < NGX_REGEX_NO_MATCHED) {
         ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
-                      ngx_regex_exec_n " failed: %i on \"%V\" using \"%V\"",
+                      ngx_regex_exec_n " failed: %d on \"%V\" using \"%V\"",
                       rc, str, pattern);
         return NGX_HTTP_SSI_ERROR;
     }
index 7bf6e198205fa1212a5072e89943e4c4c715cc4a..bb1c50ba7f71b3c97dcc3894552381358d87a414 100644 (file)
@@ -341,7 +341,7 @@ ngx_http_sub_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
             rc = ngx_http_sub_parse(r, ctx);
 
             ngx_log_debug4(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                           "parse: %d, looked: \"%V\" %p-%p",
+                           "parse: %i, looked: \"%V\" %p-%p",
                            rc, &ctx->looked, ctx->copy_start, ctx->copy_end);
 
             if (rc == NGX_ERROR) {
index 401b58e5c76a74b5efa2f4aa0a1900d367918e5c..8a5f0fa3a07cdad83d870b1e11ecc5b3df8a2166 100644 (file)
@@ -199,7 +199,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
         }
 
         ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
-                       "get ip hash peer, hash: %ui %04XA", p, m);
+                       "get ip hash peer, hash: %ui %04XL", p, (uint64_t) m);
 
         if (peer->down) {
             goto next;
index fd790e10bd594bc8795677ad9056d07e4255358f..7d6cada4d1a5502a29d28c5cca810af4119c26bc 100644 (file)
@@ -648,7 +648,7 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
 
     err = ngx_socket_errno;
 
-    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, rev->log, 0, "http recv(): %d", n);
+    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, rev->log, 0, "http recv(): %z", n);
 
     if (n == -1) {
         if (err == NGX_EAGAIN) {
@@ -1500,7 +1500,7 @@ ngx_http_alloc_large_header_buffer(ngx_http_request_t *r,
     }
 
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http large header copy: %d", r->header_in->pos - old);
+                   "http large header copy: %uz", r->header_in->pos - old);
 
     new = b->start;
 
@@ -2264,7 +2264,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
     c = r->connection;
 
     ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http finalize request: %d, \"%V?%V\" a:%d, c:%d",
+                   "http finalize request: %i, \"%V?%V\" a:%d, c:%d",
                    rc, &r->uri, &r->args, r == c->data, r->main->count);
 
     if (rc == NGX_DONE) {
@@ -2956,7 +2956,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
         b->last = b->start;
     }
 
-    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "hc free: %p %d",
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "hc free: %p %i",
                    hc->free, hc->nfree);
 
     if (hc->free) {
@@ -2968,7 +2968,7 @@ ngx_http_set_keepalive(ngx_http_request_t *r)
         hc->nfree = 0;
     }
 
-    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "hc busy: %p %d",
+    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, "hc busy: %p %i",
                    hc->busy, hc->nbusy);
 
     if (hc->busy) {
@@ -3259,7 +3259,7 @@ ngx_http_lingering_close_handler(ngx_event_t *rev)
     do {
         n = c->recv(c, buffer, NGX_HTTP_LINGERING_BUFFER_SIZE);
 
-        ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "lingering read: %d", n);
+        ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "lingering read: %z", n);
 
         if (n == NGX_ERROR || n == 0) {
             ngx_http_close_request(r, 0);
index 879c63cbb1aca9f4cbc11ab2b77a04158fac594f..bff95250c73879c519d9f4051366eff941fcaa3c 100644 (file)
@@ -1488,7 +1488,7 @@ ngx_http_script_file_code(ngx_http_script_engine_t *e)
     r = e->request;
 
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-                   "http script file op %p \"%V\"", code->op, &path);
+                   "http script file op %p \"%V\"", (void *) code->op, &path);
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
index c1644409900dc72966ab13ecc16b088a0efb6c70..003623151ab1cd720075a235112d44d018a4bd91 100644 (file)
@@ -174,7 +174,7 @@ ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
     *ll = NULL;
 
     ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0,
-                   "http write filter: l:%d f:%d s:%O", last, flush, size);
+                   "http write filter: l:%ui f:%ui s:%O", last, flush, size);
 
     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
 
index ababd4b259add5ad9ffe9f2abe15784b32219432..d63226596a4222d8c56c80d512a056f2441bdfe8 100644 (file)
@@ -2124,7 +2124,7 @@ ngx_http_v2_state_ping(ngx_http_v2_connection_t *h2c, u_char *pos, u_char *end)
     }
 
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
-                   "http2 PING frame, flags: %ui", h2c->state.flags);
+                   "http2 PING frame, flags: %ud", h2c->state.flags);
 
     if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) {
         return ngx_http_v2_state_skip(h2c, pos, end);
index d93e94644ac67d2c5d144fc751264dc115a837b7..39f9b1793d6051b6b7e6c3bb00693ad4bb3ab9e7 100644 (file)
@@ -431,7 +431,7 @@ ngx_mail_auth_http_ignore_status_line(ngx_mail_session_t *s,
             }
 
             ngx_log_error(NGX_LOG_ERR, s->connection->log, 0,
-                          "auth http server &V sent invalid response",
+                          "auth http server %V sent invalid response",
                           ctx->peer.name);
             ngx_close_connection(ctx->peer.connection);
             ngx_destroy_pool(ctx->pool);
index 3802c3e6751344bf98225feff976dd1821a08a48..007284b6848f9f59dda02486390c1b68b0357b88 100644 (file)
@@ -935,7 +935,7 @@ ngx_mail_proxy_handler(ngx_event_t *ev)
     do_write = ev->write ? 1 : 0;
 
     ngx_log_debug3(NGX_LOG_DEBUG_MAIL, ev->log, 0,
-                   "mail proxy handler: %d, #%d > #%d",
+                   "mail proxy handler: %ui, #%d > #%d",
                    do_write, src->fd, dst->fd);
 
     for ( ;; ) {
index b11cf8a3d841eefabbe1e861bc781ac0f083d72e..aedc3c90ce6a614fc8c90591179fcb4b06a884c4 100644 (file)
@@ -84,7 +84,7 @@ ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset,
     }
 
     ngx_log_debug4(NGX_LOG_DEBUG_CORE, file->log, 0,
-                   "aio complete:%d @%O:%z %V",
+                   "aio complete:%d @%O:%uz %V",
                    ev->complete, offset, size, &file->name);
 
     if (ev->complete) {
index bcef7ecb0cc43b7cb5c776ea0a80cadebebab272..65c79a24139711677308ac9456608b408e99e9a7 100644 (file)
@@ -176,7 +176,7 @@ ngx_thread_read_handler(void *data, ngx_log_t *log)
 #endif
 
     ngx_log_debug4(NGX_LOG_DEBUG_CORE, log, 0,
-                   "pread: %z (err: %i) of %uz @%O",
+                   "pread: %z (err: %d) of %uz @%O",
                    n, ctx->err, ctx->size, ctx->offset);
 }
 
index b0a9236042166bb60dce4d7bf29caf26577a3dcb..9f0a6c124e1d793e93084859f3ec034ca868a8a7 100644 (file)
@@ -73,7 +73,7 @@ ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, off_t offset,
     }
 
     ngx_log_debug4(NGX_LOG_DEBUG_CORE, file->log, 0,
-                   "aio complete:%d @%O:%z %V",
+                   "aio complete:%d @%O:%uz %V",
                    ev->complete, offset, size, &file->name);
 
     if (ev->complete) {
index 50a9cea2ecac924454df362fcea4c4f07dc1864e..3c0696a025f3b1ad7ed11cbf3c9794dbcd996bdb 100644 (file)
@@ -451,7 +451,7 @@ again:
 #endif
 
     ngx_log_debug4(NGX_LOG_DEBUG_EVENT, log, 0,
-                   "sendfile: %z (err: %i) of %uz @%O",
+                   "sendfile: %z (err: %d) of %uz @%O",
                    n, ctx->err, ctx->size, file->file_pos);
 
     if (ctx->err == NGX_EINTR) {
index 9be637680b24e666d5483935b6b5f9476aff84e4..7cee1c5489fb657057d47c0cc0c93577e600a031 100644 (file)
@@ -145,7 +145,7 @@ ngx_master_process_cycle(ngx_cycle_t *cycle)
             }
 
             ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
-                           "termination cycle: %d", delay);
+                           "termination cycle: %M", delay);
 
             itv.it_interval.tv_sec = 0;
             itv.it_interval.tv_usec = 0;
@@ -438,7 +438,7 @@ ngx_pass_open_channel(ngx_cycle_t *cycle, ngx_channel_t *ch)
         }
 
         ngx_log_debug6(NGX_LOG_DEBUG_CORE, cycle->log, 0,
-                      "pass channel s:%d pid:%P fd:%d to s:%i pid:%P fd:%d",
+                      "pass channel s:%i pid:%P fd:%d to s:%i pid:%P fd:%d",
                       ch->slot, ch->pid, ch->fd,
                       i, ngx_processes[i].pid,
                       ngx_processes[i].channel[0]);
@@ -492,7 +492,7 @@ ngx_signal_worker_processes(ngx_cycle_t *cycle, int signo)
     for (i = 0; i < ngx_last_process; i++) {
 
         ngx_log_debug7(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
-                       "child: %d %P e:%d t:%d d:%d r:%d j:%d",
+                       "child: %i %P e:%d t:%d d:%d r:%d j:%d",
                        i,
                        ngx_processes[i].pid,
                        ngx_processes[i].exiting,
@@ -570,7 +570,7 @@ ngx_reap_children(ngx_cycle_t *cycle)
     for (i = 0; i < ngx_last_process; i++) {
 
         ngx_log_debug7(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
-                       "child: %d %P e:%d t:%d d:%d r:%d j:%d",
+                       "child: %i %P e:%d t:%d d:%d r:%d j:%d",
                        i,
                        ngx_processes[i].pid,
                        ngx_processes[i].exiting,
@@ -1047,7 +1047,7 @@ ngx_channel_handler(ngx_event_t *ev)
         }
 
         ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0,
-                       "channel command: %d", ch.command);
+                       "channel command: %ui", ch.command);
 
         switch (ch.command) {
 
index 3544b4b17ebe4f0f086123af81287dfc7e9215e9..9953782d630bbdf9818506710fc8efc013e5fbb7 100644 (file)
@@ -101,7 +101,7 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain, off_t limit)
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "readv: %d, last:%d", vec.nelts, iov->iov_len);
+                   "readv: %ui, last:%uz", vec.nelts, iov->iov_len);
 
     do {
         n = readv(c->fd, (struct iovec *) vec.elts, vec.nelts);
index 86675dfdd8fe194c9aadfab7c180d895916305bb..fc7f76ce96915b2574ef1b8c53d657d835a747cc 100644 (file)
@@ -52,7 +52,7 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
         n = recv(c->fd, buf, size, 0);
 
         ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                       "recv: fd:%d %d of %d", c->fd, n, size);
+                       "recv: fd:%d %z of %uz", c->fd, n, size);
 
         if (n >= 0) {
             if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
@@ -139,7 +139,7 @@ ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
         n = recv(c->fd, buf, size, 0);
 
         ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                       "recv: fd:%d %d of %d", c->fd, n, size);
+                       "recv: fd:%d %z of %uz", c->fd, n, size);
 
         if (n == 0) {
             rev->ready = 0;
index 80995ab3a50e4919af2bc76484c982cd97e34db0..61ea2025257f5f200a15b565f558760d7ab8aed0 100644 (file)
@@ -34,7 +34,7 @@ ngx_unix_send(ngx_connection_t *c, u_char *buf, size_t size)
         n = send(c->fd, buf, size, 0);
 
         ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                       "send: fd:%d %d of %d", c->fd, n, size);
+                       "send: fd:%d %z of %uz", c->fd, n, size);
 
         if (n > 0) {
             if (n < (ssize_t) size) {
index 1c807a08bb2cf26cbe55ef74ba168e3f46081006..e03bf6c5398d6ce16d3339540590e5a6fd269304 100644 (file)
@@ -25,7 +25,7 @@ ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
         n = recv(c->fd, buf, size, 0);
 
         ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                       "recv: fd:%d %d of %d", c->fd, n, size);
+                       "recv: fd:%d %z of %uz", c->fd, n, size);
 
         if (n >= 0) {
             if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
@@ -83,7 +83,7 @@ ngx_udp_unix_recv(ngx_connection_t *c, u_char *buf, size_t size)
         n = recv(c->fd, buf, size, 0);
 
         ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                       "recv: fd:%d %d of %d", c->fd, n, size);
+                       "recv: fd:%d %z of %uz", c->fd, n, size);
 
         if (n >= 0) {
             return n;
index 732b0890a06d2ad694a6b3de60125c4fee5fd87b..f1d8a37c7647f45b6d2e912bdaab5c8d84475fed 100644 (file)
@@ -220,7 +220,7 @@ ngx_stream_limit_conn_handler(ngx_stream_session_t *s)
         }
 
         ngx_log_debug2(NGX_LOG_DEBUG_STREAM, s->connection->log, 0,
-                       "limit conn: %08XD %d", node->key, lc->conn);
+                       "limit conn: %08Xi %d", node->key, lc->conn);
 
         ngx_shmtx_unlock(&shpool->mutex);
 
@@ -340,7 +340,7 @@ ngx_stream_limit_conn_cleanup(void *data)
     ngx_shmtx_lock(&shpool->mutex);
 
     ngx_log_debug2(NGX_LOG_DEBUG_STREAM, lccln->shm_zone->shm.log, 0,
-                   "limit conn cleanup: %08XD %d", node->key, lc->conn);
+                   "limit conn cleanup: %08Xi %d", node->key, lc->conn);
 
     lc->conn--;