log: finish reworking the core API.