zterm

The daemon's log

The zc daemon writes what it does to daemon.log in its data directory. When a command starts a daemon and the daemon does not answer, the command's error quotes the last line of that log.

Startup lines

The daemon writes its first line as it starts, before anything that can wait:

zcd: start: pid 4211, zc 0.9.70 (a1b2c3d), data dir /home/me/.local/share/zc

Each startup step that can block then gets two lines: one as it begins, and one as it ends with the time it took, or with the error it failed with.

zcd: start: taking the data dir's lock
zcd: start: taking the data dir's lock: done in 0 ms
zcd: start: opening the store at /home/me/.local/share/zc/store.db
zcd: start: opening the store at /home/me/.local/share/zc/store.db: done in 14 ms
zcd: start: verifying the store
zcd: start: verifying the store: done in 3 ms
zcd: start: binding /tmp/zc-501/zc.sock
zcd: start: binding /tmp/zc-501/zc.sock: done in 0 ms
zcd: start: ready, answering on /tmp/zc-501/zc.sock, 22 ms after starting

The steps are taking the data directory's lock, opening the store (which includes any update to its format), verifying the store, binding the socket, and, on a team board's server, starting its listener. The ready line comes last, just before the daemon answers its first request.

Each line is in the file as soon as it is written. A daemon that stalls, or is killed, leaves the step it was in as the log's last line: a line that begins a step with no done line after it. A command that gave up waiting quotes that line in its error, for example:

the daemon it started (pid 4211) is still running after 30.0 s and has not
answered; it was left running and may yet come up; the last line of
/home/me/.local/share/zc/daemon.log is: zcd: start: opening the store at
/home/me/.local/share/zc/store.db

A relay daemon, which forwards to a team board, writes the first line and the lock's step. It writes the store's two steps when it opens this machine's local board, and writes no binding or ready lines of this kind.