AlinsRan opened a new pull request, #13504:
URL: https://github.com/apache/apisix/pull/13504

   ### Description
   
   `kafka-logger` and `rocketmq-logger` log the full serialized batch payload 
right before sending it:
   
   ```lua
   core.log.info("send data to kafka: ", data)     -- kafka-logger
   core.log.info("send data to rocketmq: ", data)  -- rocketmq-logger
   ```
   
   `data` is the serialized log entries, which by default include 
request/response headers and bodies, so it can leak credentials (e.g. 
`Authorization`/`Cookie` headers) into the error log when the log level is set 
to `info`.
   
   This PR removes those statements. The existing tests used this log line to 
observe what was queued for delivery, so the same observability is reproduced 
with a **test-only** hook that logs each batch entry from 
`batch-processor-manager` (the entry is the exact object that gets sent, so 
content-sensitive assertions — including the `no_error_log` body-filter cases — 
keep working). Production code no longer logs the payload.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have updated the documentation to reflect this change (N/A)
   - [x] I have verified that the changes pass the existing tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to