@task
@runs_once
@requires_config(StandaloneConfig)
def logs():
    """
    Gather all the server logs and presto-admin log and create a tar file.
    """
    downloaded_logs_location = os.path.join(TMP_PRESTO_DEBUG, "logs")
    ensure_directory_exists(downloaded_logs_location)

    print 'Downloading logs from all the nodes...'
    execute(get_remote_log_files, downloaded_logs_location, roles=env.roles)

    copy_admin_log(downloaded_logs_location)

    make_tarfile(OUTPUT_FILENAME_FOR_LOGS, downloaded_logs_location)
    print 'logs archive created: ' % OUTPUT_FILENAME_FOR_LOGS
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/collect.py/logs/operator `+` -> `%`