factor out all logging into separate functions, since that has protocol overhead too
Merge branch 'perf' of github.com:ztellman/lamina into perf