提交 aa3c89ce 编写于 作者: Z zhangxin10

修改异常日志打印

上级 bd495ab0
......@@ -32,7 +32,7 @@ class AppendEOFFlagThread extends Thread {
bufferedWriter.flush();
bufferedWriter.close();
} catch (IOException e) {
logger.error("Flush data file failed", e);
}
}
}
......
......@@ -40,7 +40,6 @@ public class RegisterPersistenceThread extends Thread {
}
Collection<FileRegisterEntry> fileRegisterEntries = MemoryRegister.instance().getEntries();
logger.info("file Register Entries size [{}]", fileRegisterEntries.size());
BufferedWriter writer = null;
try {
writer = new BufferedWriter(new FileWriter(file));
} catch (IOException e) {
......@@ -52,7 +51,7 @@ public class RegisterPersistenceThread extends Thread {
try {
writer.write(fileRegisterEntry.toString() + "\n");
} catch (IOException e) {
e.printStackTrace();
logger.error("Write file register entry to offset file failure", e);
}
}
try {
......@@ -60,7 +59,7 @@ public class RegisterPersistenceThread extends Thread {
writer.flush();
writer.close();
} catch (IOException e) {
e.printStackTrace();
logger.error("Flush offset file failure", e);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册