Skip to content

Commit

Permalink
fix: improve loggings for config recovery (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 authored and MikeDombo committed Feb 23, 2023
1 parent 0054611 commit 4ff60ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private static void mergeTLogInto(Configuration c, Path p) throws IOException {
public static boolean validateTlog(Path tlogPath) {
try {
if (!Files.exists(tlogPath)) {
logger.atError().setEventType("validate-tlog").kv("path", tlogPath)
logger.atDebug().setEventType("validate-tlog").kv("path", tlogPath)
.log("Transaction log file does not exist at given path");
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,9 @@ private void readConfigFromBackUpTLog(Path transactionLogPath, Path bootstrapTlo
return;
}
}
logger.atError().log("Transaction log {} is invalid and no usable backup exists", transactionLogPath);
logger.atWarn().log("Transaction log {} is invalid and no usable backup transaction log exists. Either an "
+ "initial Nucleus setup is ongoing or all config tlogs were corrupted",
transactionLogPath);
}

@SuppressWarnings("PMD.CloseResource")
Expand Down

0 comments on commit 4ff60ac

Please sign in to comment.