code: def _log(self, fname, txt, prg=''):
          
          if os.sep not in fname:
              fname = self.log_folder + os.sep + fname
          delim = ','
          q = '"'
          dte = TodayAsString()
          usr = GetUserName()
          hst = GetHostName()
          i = self.session_id
   
          if prg == '':
              prg = 'cls_log.log' 
          logEntry = q + dte + q + delim + q + i + q + delim + q + usr + q + delim + q + hst + q + delim + q + prg + q + delim + q + txt + q + delim + '\n'
          with open(fname, "a", encoding='utf-8', errors='replace') as myfile:
              myfile.write(logEntry)
docs: logs an entry to fname along with standard date and user details