simplified the if statement for the logger setting