I am using pexpect to handle my telnet and ssh communication.
I am also writing all request/response in a logfile. using pexpect.logfile(filename).
I would like to have timestamps in the logfile as well.
I can not find it anywhere in the documentation! Does anyone have any idea how to implement this functionality?
After some searching I found the below code which works for me!
Take a look at the below code: