Numerous improvements to logging utilities