Skip to content

Commit

Permalink
added debug
Browse files Browse the repository at this point in the history
  • Loading branch information
codybum committed Apr 24, 2024
1 parent 08b83a9 commit 773dca6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/io/cresco/agent/core/CLoggerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ public void setLogLevel(Level level) {
private String replaceBrackets(String logMessage, Object ... params) {
int replaced = 0;
while (logMessage.contains("{}") && replaced < params.length) {
logMessage = logMessage.replaceFirst("\\{\\}", String.valueOf(params[replaced]));
replaced++;
try {
logMessage = logMessage.replaceFirst("\\{\\}", String.valueOf(params[replaced]));
replaced++;
} catch (Exception ex) {
logService.error("CORE LOGGER REGEX ERROR: MESSAGE:[" + logMessage + "]");
}
}
return logMessage;
}
Expand Down

0 comments on commit 773dca6

Please sign in to comment.