More logging optimizations