renamed shouldLog to filter