feat: add log to check resource release status #627

This commit is contained in:
tjq 2023-05-07 21:41:00 +08:00
parent 1a40447b23
commit 174696066d

View File

@ -57,7 +57,9 @@ public class ConnectionFactory {
// JVM 关闭时删除数据库文件
try {
FileUtils.forceDeleteOnExit(new File(H2_PATH));
}catch (Exception ignore) {
log.info("[PowerDatasource] delete worker db file[{}] on JVM exit successfully", H2_PATH);
}catch (Throwable t) {
log.warn("[PowerDatasource] delete file on JVM exit failed: {}", H2_PATH, t);
}
}