conditionally create kafka logger