logger will sometimes be null