oscerd opened a new pull request, #29736:
URL: https://github.com/apache/camel/pull/29736
## CAMEL-26891: camel-whatsapp - log the response status at INFO and the
response body at DEBUG
### Problem
`WhatsAppServiceRestAPIAdapter` logs the full provider REST response body at
`INFO` on every
reply. For routine traffic this is more verbose than the status alone
warrants, and it is more
verbose than the outbound request, which the producer already logs at
`DEBUG`. The response
body also carries the message recipient and the provider message
identifiers, which do not
belong in the default-level log.
### Change
- Log only the response status code at `INFO`.
- Log the status and the full body at `DEBUG`, so the body stays available
for diagnostics when
`DEBUG` is enabled for
`org.apache.camel.component.whatsapp.service.WhatsAppServiceRestAPIAdapter`.
- The parsed response is unchanged and is still set as the message body for
the route, so route
behaviour is not affected.
### Tests
- New `WhatsAppProducerResponseLogTest` drives the producer against a local
HTTP server that
returns a response body with marker recipient and message-id values,
captures the adapter's
log events, and asserts that at `INFO` the status is logged while the body
(and its markers)
is not, and that the parsed response still reaches the route.
- The existing `WhatsAppProducerFailureTest` and the rest of the module
suite pass (34 tests in
`camel-whatsapp`).
### Documentation
- Added an upgrade-guide note under "Upgrading Camel 4.23 to 4.24"
describing the changed log
output.
_Claude Code on behalf of oscerd_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]