Skip to content

Commit 4ff60ac

Browse files
junfuchen99MikeDombo
authored andcommitted
fix: improve loggings for config recovery (#1414)
1 parent 0054611 commit 4ff60ac

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/aws/greengrass/config/ConfigurationReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static void mergeTLogInto(Configuration c, Path p) throws IOException {
113113
public static boolean validateTlog(Path tlogPath) {
114114
try {
115115
if (!Files.exists(tlogPath)) {
116-
logger.atError().setEventType("validate-tlog").kv("path", tlogPath)
116+
logger.atDebug().setEventType("validate-tlog").kv("path", tlogPath)
117117
.log("Transaction log file does not exist at given path");
118118
return false;
119119
}

src/main/java/com/aws/greengrass/lifecyclemanager/KernelLifecycle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,9 @@ private void readConfigFromBackUpTLog(Path transactionLogPath, Path bootstrapTlo
388388
return;
389389
}
390390
}
391-
logger.atError().log("Transaction log {} is invalid and no usable backup exists", transactionLogPath);
391+
logger.atWarn().log("Transaction log {} is invalid and no usable backup transaction log exists. Either an "
392+
+ "initial Nucleus setup is ongoing or all config tlogs were corrupted",
393+
transactionLogPath);
392394
}
393395

394396
@SuppressWarnings("PMD.CloseResource")

0 commit comments

Comments
 (0)