Add logging to TCP writer/reader.