Skip to content

Commit cadf995

Browse files
authored
fix: previous logs getting discarded before apisix custom handler (#94)
1 parent 22cbc7d commit cadf995

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: src/ngx_http_apisix_module.c

+1
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ ngx_http_apisix_combined_error_log_handler(ngx_http_request_t *r, ngx_http_reque
877877
//p - buf calculates the number of bytes written by the original log handler into the buffer.
878878
//len -= (p - buf) reduces the remaining buffer length by the amount already used.
879879
len -= p-buf;
880+
buf = p;
880881

881882
//Apisix log handler
882883
buf = ngx_http_apisix_error_log_handler(r, buf, len);

0 commit comments

Comments
 (0)