print queries in logs