Added query method to logger