some logging optimizations