simplified and improved logger filter() method.