Write queries executed by the global wpdb object to a log file.