Some logging optimizations.