pjfanning opened a new pull request, #1940:
URL: https://github.com/apache/pekko-connectors/pull/1940

   ### Motivation
   Several slf4j log calls in main sources built their message with an 
s-interpolator, so the string was concatenated even when the level was 
disabled. slf4j can defer that formatting to the point where it knows the event 
will actually be emitted.
   
   ### Modification
   Replaced the interpolated messages with `{}` placeholders and argument lists 
in:
   
   - `PekkoHttpClient.tryCreateCustomContentType` (`logger.debug`)
   - `LogCapturing.withFixture` (two `info` calls)
   - `LogCapturingJunit4.apply` (two `info` calls)
   
   Log output is unchanged. Non-slf4j logging (Pekko `LoggingAdapter` in 
`mqttv5`, `sse`, `file`, `jms`, `jakartams`, `unix-domain-socket`) and 
non-logging interpolations were left alone.
   
   ### Result
   No message is formatted unless the level is enabled. The `debug` call in 
`tryCreateCustomContentType` is the one on a request path, so it no longer 
builds a string per request when debug logging is off.
   
   ### Tests
   - `sbt "aws-spi-pekko-http/compile" "s3/compile" "testkit/compile"` / pass
   - `sbt -batch "++3.3.8" "aws-spi-pekko-http/compile" "s3/compile" 
"testkit/compile"` / pass (checked Scala 3 explicitly because the 2-arg vs 
varargs slf4j overload resolution can differ)
   - `scalafmt --list` on the changed files / clean
   - `PekkoHttpClientSpec` gains a directional test that captures the logback 
output and asserts the debug line renders as `Try to parse content type from 
application/xml`, which fails if the placeholder and argument counts ever 
drift. Not executed locally, left to CI.
   - MiMa not run: method-body-only changes, no signature or public API impact.
   
   ### References
   None - follow-up cleanup of slf4j usage in main sources
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to