If you move the `@logger ||=` check before the if, would that remove the warning?