提交 aa3c89ce 编写于 作者: Z zhangxin10

修改异常日志打印

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