@staticmethod<EOL><INDENT>def fetch_logs_from_host(hostname, install_path, prefix, logs, directory, pattern):<DEDENT>
if hostname is not None:<EOL><INDENT>with get_sftp_client(hostname, username=runtime.get_username(), password=runtime.get_password()) as ftp:<EOL><INDENT>for f in logs:<EOL><INDENT>try:<EOL><INDENT>mode = ftp.stat(f).st_mode<EOL><DEDENT>except IOError as e:<EOL><INDENT>if e.errno == errno.ENOENT:<EOL><INDENT>logger.error("<STR_LIT>" + f + "<STR_LIT>" + hostname)<EOL>pass<EOL><DEDENT><DEDENT>else:<EOL><INDENT>copy_dir(ftp, f, directory, prefix)<EOL><DEDENT><DEDENT>if install_path is not None:<EOL><INDENT>copy_dir(ftp, install_path, directory, prefix, pattern)<EOL><DEDENT><DEDENT><DEDENT>
Static method Copies logs from specified host on the specified install path

        :Parameter hostname the remote host from where we need to fetch the logs
        :Parameter install_path path where the app is installed
        :Parameter prefix prefix used to copy logs. Generall the unique_id of process
        :Parameter logs a list of logs given by absolute path from the remote host
        :Parameter directory the local directory to store the copied logs
        :Parameter pattern a pattern to apply to files to restrict the set of logs copied