[FEATURE] Add an option to toggle query logging