Skip to content

Commit

Permalink
Merge pull request #3919 from iTwins/fix/formatMessage_fix
Browse files Browse the repository at this point in the history
skip already substituted parts when formatting message
  • Loading branch information
Sfiguz7 authored Dec 6, 2023
2 parents d2f7486 + df479f1 commit b646e15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static void log(@Nonnull String test, @Nonnull String msg, @Nonnull Objec
while ((i = msg.indexOf('{', i)) != -1 && msg.charAt(i + 1) == '}') {
// Substring up to the opening brace `{`, add the variable for this and add the rest of the message
msg = msg.substring(0, i) + vars[idx] + msg.substring(i + 2);
idx++;
i += String.valueOf(vars[idx++]).length();
}

return msg;
Expand Down

0 comments on commit b646e15

Please sign in to comment.