def METHOD_NAME(self, line):
    """ If the log line has our tool and a run dir, make a command line.
    """
    if self._args_pattern.search(line):
        self._args_line_count += 1
        if self._tool_pattern.search(line):
            self._tool_line_count += 1
            self._tool_args_line=line
            self._args_line_has_tool=True
        else:
            self._args_line_has_tool=False
    if self._dir_pattern.search(line) and self._args_line_has_tool:
        self._dir_line_count += 1
        self._dir_line = line
        self._command_file.write (self._make_command(self._tool_args_line, self._dir_line) + '\n')