add query log; 

add $this->logQueries param, and depending on its value, log all queries to $this->queryHistory array;