log the data to send gateway