Reintroduced support for log_queries