|
Re: File IO without overwriting file
If we can't get a generic append function working, we'll probably go with multiple incrementing log files, but there are some downsides:
-Since the robot can terminate unexpectedly, we have to flush our buffer fairly often to make sure we don't lose data due to a power failure or unexpected reboot
-Too many small files is a pain to read and process, so we would need to find a balance
I'll try to get more detail about our current IO exception (also, does anybody else have that problem where FileConnection.fileSize() returns an enormous number?), and if that doesn't work out, implement a solution like joelg236's. We already had some code that buffered about 7.9k worth of logs before flushing to disk, so we shouldn't be spending too much time on IO.
|