add query log