Log all queries for profiling