Repository navigation
Use slf4p's format-args-plus-exception overloads - #570
Merged
Merged
Conversation
The five log calls that pass an exception built their message eagerly (string concatenation or Format) because ILogger had no overload taking format arguments and an exception. slf4p 1.2.0 adds one (slf4p#97), so use it; the logged text is unchanged. Daraja now requires slf4p 1.2.0 (README, CHANGELOG). Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #559.
Summary
(AFormat; AArgs: array of const; AException: Exception)overload (Add format-args-plus-exception overloads to ILogger slf4p#97) instead of formatting the message themselves:TdjWebFilterHolder.Stop(2 calls)TdjWebComponentHolder.StopTdjWebComponentHandler.InvokeServiceTdjWebComponentContextHandler.DoHandle(an ErrorHandler that raised)...Stop:calls keep their prefix.masteris1.2.0-SNAPSHOTand already has the overload; slf4p 1.2.0 must be released before Daraja 3.5.0.Test plan
The changed lines are compiled only with
DARAJA_LOGGING, which neitherrun-fpc.cmd,run-delphi.cmdnor CI defines. I checked them separately:-dDARAJA_LOGGINGagainst slf4pmaster.Unittests.dprbuilt with-DDARAJA_LOGGINGruns 215/215 OK. The log output shows the new calls, e.g.ERROR TdjWebComponentContextHandler ErrorHandler raised Exception while handling EUnitTestException; falling back to the default error responseandWARN TdjWebFilterHolder TdjWebFilterHolder.Stop: error in destroy, each followed by the exception class and message.🤖 Generated with Claude Code