You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/09/10 23:56:18 UTC

[PR] AWS SPI Pekko HTTP, Testkit: use parameterized slf4j logging [pekko-connectors]

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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] AWS SPI Pekko HTTP, Testkit: use parameterized slf4j logging [pekko-connectors]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1940:
URL: https://github.com/apache/pekko-connectors/pull/1940


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org