davsclaus opened a new pull request, #23715: URL: https://github.com/apache/camel/pull/23715
## Summary Fixes [CAMEL-23662](https://issues.apache.org/jira/browse/CAMEL-23662): Setting `logMask="false"` on a route did not override `logMask="true"` on the CamelContext when using the log **component** (`<to uri="log:..."/>`). The override only worked with the Log **EIP** (`.log("...")`) or as a query parameter on the endpoint URI (`?logMask=false`). ## Root Cause `LogEndpoint.getMaskingFormatter()` resolved the masking decision at endpoint creation time, consulting only the endpoint's URI parameter and `CamelContext.isLogMask()`. It never checked the route's `logMask` setting. The Log EIP (`LogReifier`) correctly consulted `route.isLogMask()` at reification time, but the Log component endpoint did not. ## Fix - `CamelLogProcessor` now supports checking the route's `logMask` at process time via `exchange.getUnitOfWork().getRoute()`, respecting the precedence: **endpoint parameter > route > context** - `LogEndpoint` enables this route-aware behavior when creating the `CamelLogProcessor` - This also fixes the inverse case (route enables masking while context has it disabled) ## Test Plan - [x] New test `LogMaskRouteOverrideTest` verifying: - Route `logMask=false` overrides context `logMask=true` for the log component - Route `logMask=true` overrides context `logMask=false` for the log component - [x] Existing `LogMaskTest` and `LogEipMaskTest` still pass (no regressions) - [x] Full reactor build passes _Claude Code on behalf of Claus Ibsen_ -- 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]
