writeLog function

Write text as log to a connection