Skip to content

Commit

Permalink
Merge pull request #44834 from gsmet/fix-off-by-one-logging
Browse files Browse the repository at this point in the history
Fix off-by-one error in exception decoration code
  • Loading branch information
gastaldi authored Nov 30, 2024
2 parents e3ab6bd + 64f0108 commit 41ed342
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public void accept(LogRecord logRecord, Consumer<LogRecord> logRecordConsumer) {
Object[] np = p != null ? Arrays.copyOf(p, p.length + 1) : new Object[1];
np[np.length - 1] = decoratedString;
elr.setParameters(np);
elr.setMessage(elr.getMessage() + "\n\n%" + (np.length - 1) + "$s",
elr.setMessage(elr.getMessage() + "\n\n%" + np.length + "$s",
ExtLogRecord.FormatStyle.PRINTF);
}
case NO_FORMAT -> {
Expand Down

0 comments on commit 41ed342

Please sign in to comment.