Rewrite Log and Tcp in object