latools/helpers/logging.py
def write_logfile(log, header, file_name):
    """
    Write and analysis log to a file.

    Parameters
    ----------
    log : list
        latools.analyse analysis log
    header : list
        File header lines.
    file_name : str
        Destination file. If no file extension
        specified, uses '.lalog'

    Returns
    -------
    None
    """
    path, ext = os.path.splitext(file_name)
    if ext == '':
        ext = '.lalog'
    
    with open(path + ext, 'w') as f:
        f.write('\n'.join(header))
        f.write('\n'.join(log))
    
    return path + ext
def write_logfile(log, header, file_name):
    """
    Write and analysis log to a file.

    Parameters
    ----------
    log : list
        latools.analyse analysis log
    header : list
        File header lines.
    file_name : str
        Destination file. If no file extension
        specified, uses '.lalog'

    Returns
    -------
    None
    """
    path, ext = os.path.splitext(file_name)
    if ext == '':
        ext = '.lalog'
    
    with open(path + ext, 'w') as f:
        f.write('\n'.join(header))
        f.write('\n'.join(log))
    
    return path + ext
Write and analysis log to a file.

    Parameters
    ----------
    log : list
        latools.analyse analysis log
    header : list
        File header lines.
    file_name : str
        Destination file. If no file extension
        specified, uses '.lalog'

    Returns
    -------
    None