Copilot commented on code in PR #12515:
URL: https://github.com/apache/cloudstack/pull/12515#discussion_r2730168836
##########
utils/src/main/java/org/apache/cloudstack/utils/jsinterpreter/JsInterpreter.java:
##########
@@ -136,36 +136,25 @@ public void discardCurrentVariables() {
*/
public void injectVariable(String key, Object value) {
if (key == null) return;
- logger.trace(String.format(injectingLogMessage, key,
String.valueOf(value)));
+ logger.trace(injectingLogMessage, key, value);
variables.put(key, value);
Review Comment:
`injectingLogMessage` is defined with `%s` placeholders but used with
parameterized logging (`logger.trace(injectingLogMessage, key, value)`), which
means Log4j will not substitute the values (it expects `{}`) and the log
message will print the raw `%s` tokens. To make the trace log useful, either
change the message template to use `{}` placeholders or inline the format
string directly in the `logger.trace` call using `{}`.
--
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]