X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/c220fd0ce751005b675283b5c778d74bf5b8f630..4e3341f81d4c9b296c8fd016f4a086752d561efd:/log.go?ds=inline diff --git a/log.go b/log.go index 7b8d512..f1727d5 100644 --- a/log.go +++ b/log.go @@ -38,11 +38,11 @@ type Message struct { // Log is the append-only message log of one chat. It writes one JSON line for // each message to main/YYYY-MM-DD.jsonl, named for the local day of the write. -// It never edits or deletes a line. Each write goes to the file and to the disk -// before Append returns. An exclusive lock on the lock file makes sure that -// only one process writes the log. After a failed write, the end of the file is -// not known, so the log refuses all writes until it is opened again. The caller -// serializes all calls. +// It never edits or deletes a line. Each line goes to the operating system +// before Append returns, so a crash of the process loses no message. An +// exclusive lock on the lock file makes sure that only one process writes the +// log. After a failed write, the end of the file is not known, so the log +// refuses all writes until it is opened again. The caller serializes all calls. type Log struct { clock func() time.Time lock *os.File