Wrote log write function

Still not calling the LogWrite function but it is wrote and should be
ready to be called on. Then have to put the while spin around the
receive functions to help prevent incomplete messages from being
processed.