Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> you're almost surely not using any kind of fsync's in your plain-text logger, so that text file isn't as incorruptible as you may think

Agreed. But if the log file is corrupted, then a plain-text one will be easier to decipher for a human than any binary blob.



Writing to files in general is a fairly difficult thing if you care about not losing any data under any circumstances, because you have to use the right syscalls for the semantics of your filesystem, which may somtimes be why you're looking at corrupted files in the first place. Correctly implemented transactions can prevent you from dealing with that. Maybe that's worth giving up easily readable, searchabe and processable textfiles, maybe not.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: