[Quickfix-developers] Quickfix/J FileLog clobbers instead of appending
Brought to you by:
orenmnero
|
From: Scott H. <sco...@fo...> - 2005-12-30 13:55:50
|
I encountered a problem with checksums and went back to look at my message
logs after restarting and -- oops -- the restart clobbered them!
If any of you use quickfix.FileLogFactory and have migrated from
QuickFIX/C to QuickFIX/J (which has so far been quite painless otherwise
-- thanks everyone!), you might wish to apply the simple patch below and
redeploy.
--- src/quickfix/FileLog.java 16 Dec 2005 19:48:32 -0000 1.2
+++ src/quickfix/FileLog.java 30 Dec 2005 13:42:34 -0000 1.3
@@ -61,9 +61,10 @@
directory.mkdirs();
}
- incoming = new FileOutputStream(incomingFileName);
- outgoing = new FileOutputStream(outgoingFileName);
- events = new FileOutputStream(eventFileName);
+ boolean append = true;
+ incoming = new FileOutputStream(incomingFileName, append);
+ outgoing = new FileOutputStream(outgoingFileName, append);
+ events = new FileOutputStream(eventFileName, append);
}
public void onIncoming(String message) {
|