code: def _derive_log_path(self):
          
          filenames = listdir(self.WorkingDir)
          lognames = [
              x for x in filenames if re.match(
                  "^mothur\.\d+\.logfile$",
                  x)]
          if not lognames:
              raise ApplicationError(
                  'No log file detected in directory %s. Contents: \n\t%s' % (
                      input_dir, '\n\t'.join(possible_logfiles)))
          most_recent_logname = sorted(lognames, reverse=True)[0]
          return path.join(self.WorkingDir, most_recent_logname)
docs: Guess logfile path produced by Mothur
  
          This method checks the working directory for log files
          generated by Mothur.  It will raise an ApplicationError if no
          log file can be found.
  
          Mothur generates log files named in a nondeterministic way,
          using the current time.  We return the log file with the most
          recent time, although this may lead to incorrect log file
          detection if you are running many instances of mothur
          simultaneously.