Improved logging for TELNET and MySQL