unify log record formatting + writing.