Skip to content

Commit

Permalink
String format
Browse files Browse the repository at this point in the history
  • Loading branch information
Shih-Hao Yeh committed Nov 19, 2024
1 parent 797b1fc commit 6d7777e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ EVCacheKey getEVCacheKey(final String key) {
}

if (canonicalKey.length() > this.maxKeyLength.get() && !hashKey.get() && !autoHashKeys.get()) {
final String errMsg = "CanonicalKey ``" + canonicalKey + "`` is too long (maxLen = " + this.maxKeyLength.get() + ", keyLen = " + key.length() + ", canonicalKeyLen = " + canonicalKey.length() + ')';
log.error(errMsg);
final String errMsg = String.format("CanonicalKey ``%s`` is too long (maxLen = %d, keyLen = %d, canonicalKeyLen = %d)", canonicalKey, this.maxKeyLength.get(), key.length(), canonicalKey.length());
log.warn(errMsg);
throw new IllegalArgumentException(errMsg);
}

Expand Down

0 comments on commit 6d7777e

Please sign in to comment.