Added setThreshold method to logger