log: simplify the public API.