log sql statement