Skip to content

Commit ddb4c4a

Browse files
committed
Improved logging messages for policy handling
1 parent 52a316d commit ddb4c4a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/it/unipr/crosschain/Bridge.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public Bridge(Path bytecodeDirectoryPath, Path abiDirectoryPath, Path policyPath
103103
if (policyPath != null)
104104
loadPolicy(policyPath);
105105
else
106-
log.info("Created bridge without policy. Using default policy");
106+
log.info("Created bridge without custom policy. Using default policy");
107107

108108
}
109109

@@ -295,9 +295,11 @@ private void loadPolicy(Path policyPath) {
295295
log.warn("Policy file does not contain 'policy' array.");
296296
}
297297
} catch (IOException e) {
298-
log.error("Error reading policy file: {}", e.getMessage());
298+
log.warn("Error reading policy file: {}. Creating bridge without custom policy. Using default policy",
299+
e.getMessage());
299300
} catch (Exception e) {
300-
log.error("Error parsing policy JSON: {}", e.getMessage());
301+
log.warn("Error parsing policy JSON: {}. Creating bridge without custom policy. Using default policy",
302+
e.getMessage());
301303
}
302304
}
303305

0 commit comments

Comments
 (0)