'Print a debug message, when the debug level is > 0.
If extra arguments are present, they are substituted in the
message using the standard string formatting operator.'

def msg(self, msg, *args):

    if (self.debuglevel > 0):
        print ('Telnet(%s,%s):' % (self.host, self.port)),
        if args:
            print (msg % args)
        else:
            print msg
