Some log refactoring

Take two, with fewer warnings. :)