add helpers for query log