allow nil for logger method