@@ -2193,7 +2193,9 @@ static ngx_int_t ngx_http_clojure_body_filter(ngx_http_request_t *r, ngx_chain_
2193
2193
* where the return value of log handler will be ignored.
2194
2194
*/
2195
2195
static ngx_int_t ngx_http_clojure_log_handler (ngx_http_request_t * r ) {
2196
+ #if (NGX_DEBUG )
2196
2197
ngx_int_t rc ;
2198
+ #endif
2197
2199
ngx_http_clojure_module_ctx_t * ctx ;
2198
2200
ngx_http_clojure_loc_conf_t * lcf = ngx_http_get_module_loc_conf (r , ngx_http_clojure_module );
2199
2201
@@ -2213,15 +2215,22 @@ static ngx_int_t ngx_http_clojure_log_handler(ngx_http_request_t * r) {
2213
2215
2214
2216
ngx_http_clojure_init_ctx (ctx , NGX_HTTP_LOG_PHASE , r );
2215
2217
ngx_http_set_ctx (r , ctx , ngx_http_clojure_module );
2218
+ #if (NGX_DEBUG )
2216
2219
rc = ngx_http_clojure_eval (lcf -> log_handler_id , r , 0 );
2217
-
2218
2220
ngx_log_debug2 (NGX_LOG_DEBUG_HTTP , ngx_http_clojure_global_cycle -> log , 0 , "ngx clojure log (null ctx) request: %" PRIu64 ", rc: %d" , (jlong )(uintptr_t )r , rc );
2221
+ #else
2222
+ (void )ngx_http_clojure_eval (lcf -> log_handler_id , r , 0 );
2223
+ #endif
2219
2224
return NGX_OK ;
2220
2225
} else {
2221
2226
ctx -> hijacked_or_async = 0 ;
2222
2227
ctx -> phase = NGX_HTTP_LOG_PHASE ;
2228
+ #if (NGX_DEBUG )
2223
2229
rc = ngx_http_clojure_eval (lcf -> log_handler_id , r , 0 );
2224
2230
ngx_log_debug2 (NGX_LOG_DEBUG_HTTP , ngx_http_clojure_global_cycle -> log , 0 , "ngx clojure log (else) request: %" PRIu64 ", rc: %d" , (jlong )(uintptr_t )r , rc );
2231
+ #else
2232
+ (void )ngx_http_clojure_eval (lcf -> log_handler_id , r , 0 );
2233
+ #endif
2225
2234
return NGX_OK ;
2226
2235
}
2227
2236
0 commit comments