Adding a shouldLog method