Add log file.

    Args:
        path (:obj:`str`): Path to the log file.
431987
def add_log_file(path):
    
    logfile_handler = RotatingFileHandler(
        path, maxBytes=50000, backupCount=2)
    formatter = logging.Formatter(
        fmt='%(asctime)s %(levelname)s %(module)s - %(message)s',
        datefmt="%d-%b-%Y %H:%M:%S")
    logfile_handler.setFormatter(formatter)
    geoparse_logger.addHandler(logfile_handler)
949384
def add_to_pythonpath(self, path):
        """"""
        pathlist = self.get_pythonpath()
        if path in pathlist:
            return False
        else:
            pathlist.insert(0, path)
            self.set_pythonpath(pathlist)
            return True
1354536
def add_path(self, path):
        """"""
        if not os.path.exists(path):
            raise RuntimeError('Path does not exists: %s.' % path)
        self.paths.append(path)
353939
def update(self, path, verbose=False):
        
        if path in self._by_path:
            self.remove(path)
        else:
            self.add(path, verbose)
608559
def save_to_file(self, path):
        

        with open(path, 'w') as out:
            out.write(json.dumps(self.get_dict()))
1125311
def add_pythonpath(path):
    
    # Get PYTHONPATH value. Default is empty string.
    pythonpath = os.environ.setdefault('PYTHONPATH', '')

    # If given path is not in PYTHONPATH
    if path not in pythonpath.split(os.pathsep):
        # Prepend given path to PYTHONPATH
        pythonpath = os.environ['PYTHONPATH'] = \
            (path + os.pathsep + pythonpath) if pythonpath else path

    # Return new PYTHONPATH value
    return pythonpath
206954
def add_path(self, path, path_filter=None):
        
        for root, _, files in os.walk(path):
            for filename in files:
                full_path_and_filename = os.path.join(root, filename)
                if path_filter is None or path_filter(full_path_and_filename):
                    relative_path_and_filename = full_path_and_filename.replace(path + '/', '')
                    with open(full_path_and_filename, 'rb') as handle:
                        self.files[relative_path_and_filename] = b64encode(handle.read()).decode('utf-8')
1094627
def add_path(self, path):
        # type: (_BaseSourcePaths, str) -> None
        
        if isinstance(path, pathlib.Path):
            self._paths.append(path)
        else:
            self._paths.append(pathlib.Path(path))
393813
def add_config_path(self, path):
        
        abspath = util.abs_pathify(path)
        if abspath not in self._config_paths:
            log.info("Adding {0} to paths to search".format(abspath))
            self._config_paths.append(abspath)
1332477
def AddFileReadData(self, path, file_data_path):
    
    if self.file_system.FileEntryExistsByPath(path):
      raise ValueError('Path: {0:s} already set.'.format(path))

    with open(file_data_path, 'rb') as file_object:
      file_data = file_object.read()

    self._AddParentDirectories(path)
    self.file_system.AddFileEntry(path, file_data=file_data)
496381
def create_path(path):
    
    import os
    if not os.path.exists(path):
        os.makedirs(path)
1081479
public void logAppendFile(String path, INodeFileUnderConstruction newNode)  
                   throws IOException {
    AppendOp op = AppendOp.getInstance();  
    op.set(path, 
        newNode.getBlocks(),
        newNode.getClientName(),
        newNode.getClientMachine());   
    logEdit(op);
  }
253365
def AddFile(self, filepath):
    
    if filepath not in self._files:
      self._files.add(filepath)
      return True
    return False
262990
def save(self, path):
        
        with open(path, 'w') as f:
            f.write(self.contents())
353333
def add_file(self, path, compress):
        
        if not os.path.isfile(path):
            raise ValueError('{} is not a file'.format(path))
        self.fileobj.seek(self.last_offset)

        with open(path, 'rb') as f:
            flags = os.stat(path).st_mode & 0o777
            self.add_fileobj(f, path, compress, flags)
1169411
def _add_log_file(filename):
    """"""
    handler = logging.FileHandler(filename)

    handler.setLevel(logging.DEBUG)
    formatter = _Formatter(fmt=_logger_fmt,
                           datefmt='%Y-%m-%d %H:%M:%S')
    handler.setFormatter(formatter)
    logging.getLogger().addHandler(handler)
74558
def save(self, path):
        
        with open(path, 'wb') as f:
            f.write(self.data)