Ignore:
Timestamp:
02/04/08 15:02:07 (4 years ago)
Author:
Tomash Brechko <tomash.brechko@…>
Branches:
master-v0.7, gunzip, master-v0.6, memcached_gzip, upstream_count_limit
Children:
95d817
Parents:
ef28d8
git-author:
Tomash Brechko <tomash.brechko@…> (02/04/08 15:02:07)
git-committer:
Tomash Brechko <tomash.brechko@…> (02/04/08 15:02:07)
Message:

Fix debug messages to not assume "deflate".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/src/http/modules/ngx_http_gzip_filter_module.c

    ref28d8 rec81a7  
    309309    ngx_http_gzip_ctx_t   *ctx; 
    310310    ngx_http_gzip_conf_t  *conf; 
     311    const char            *method = (r->gunzip ? "inflate" : "deflate"); 
    311312 
    312313    ctx = ngx_http_get_module_ctx(r, ngx_http_gzip_filter_module); 
     
    366367        if (rc != Z_OK) { 
    367368            ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, 
    368                           "deflateInit2() failed: %d", rc); 
     369                          "%sInit2() failed: %d", method, rc); 
    369370            ngx_http_gzip_error(ctx); 
    370371            return NGX_ERROR; 
     
    496497 
    497498 
    498             /* is there a space for the gzipped data ? */ 
     499            /* is there a space for the output data ? */ 
    499500 
    500501            if (ctx->zstream.avail_out == 0) { 
     
    525526            } 
    526527 
    527             ngx_log_debug6(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
    528                          "deflate in: ni:%p no:%p ai:%ud ao:%ud fl:%d redo:%d", 
     528            ngx_log_debug7(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
     529                         "%s in: ni:%p no:%p ai:%ud ao:%ud fl:%d redo:%d", 
     530                         method, 
    529531                         ctx->zstream.next_in, ctx->zstream.next_out, 
    530532                         ctx->zstream.avail_in, ctx->zstream.avail_out, 
     
    539541            if (rc != Z_OK && rc != Z_STREAM_END) { 
    540542                ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, 
    541                               "deflate() failed: %d, %d", ctx->flush, rc); 
     543                              "%s() failed: %d, %d", method, ctx->flush, rc); 
    542544                ngx_http_gzip_error(ctx); 
    543545                return NGX_ERROR; 
    544546            } 
    545547 
    546             ngx_log_debug5(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
    547                            "deflate out: ni:%p no:%p ai:%ud ao:%ud rc:%d", 
     548            ngx_log_debug6(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
     549                           "%s out: ni:%p no:%p ai:%ud ao:%ud rc:%d", 
     550                           method, 
    548551                           ctx->zstream.next_in, ctx->zstream.next_out, 
    549552                           ctx->zstream.avail_in, ctx->zstream.avail_out, 
    550553                           rc); 
    551554 
    552             ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
    553                            "gzip in_buf:%p pos:%p", 
    554                            ctx->in_buf, ctx->in_buf->pos); 
     555            ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 
     556                           "%s in_buf:%p pos:%p", 
     557                           method, ctx->in_buf, ctx->in_buf->pos); 
    555558 
    556559 
     
    610613                if (rc != Z_OK) { 
    611614                    ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, 
    612                                   "deflateEnd() failed: %d", rc); 
     615                                  "%sEnd() failed: %d", method, rc); 
    613616                    ngx_http_gzip_error(ctx); 
    614617                    return NGX_ERROR; 
Note: See TracChangeset for help on using the changeset viewer.