mirror of
https://gitee.com/arthas/arthas.git
synced 2024-12-03 12:48:48 +08:00
add more log in DownloadUtils
This commit is contained in:
parent
cd3c75d1ea
commit
9f8b5fc3de
@ -86,7 +86,7 @@ public class DownloadUtils {
|
|||||||
public static String readMavenMetaData(String repoMirror, boolean http) {
|
public static String readMavenMetaData(String repoMirror, boolean http) {
|
||||||
String repoUrl = getRepoUrl(repoMirror, http);
|
String repoUrl = getRepoUrl(repoMirror, http);
|
||||||
String metaDataUrl = MAVEN_METADATA_URL.replace("${REPO}", repoUrl);
|
String metaDataUrl = MAVEN_METADATA_URL.replace("${REPO}", repoUrl);
|
||||||
AnsiLog.debug("Download maven-metadata.xml from: {}", repoUrl);
|
AnsiLog.debug("Download maven-metadata.xml from: {}", metaDataUrl);
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
try {
|
try {
|
||||||
URLConnection connection = openURLConnection(metaDataUrl);
|
URLConnection connection = openURLConnection(metaDataUrl);
|
||||||
@ -133,6 +133,8 @@ public class DownloadUtils {
|
|||||||
|
|
||||||
File tempFile = File.createTempFile("arthas", "arthas");
|
File tempFile = File.createTempFile("arthas", "arthas");
|
||||||
|
|
||||||
|
AnsiLog.debug("Arthas download temp file: " + tempFile.getAbsolutePath());
|
||||||
|
|
||||||
String remoteDownloadUrl = REMOTE_DOWNLOAD_URL.replace("${REPO}", repoUrl).replace("${VERSION}", arthasVersion);
|
String remoteDownloadUrl = REMOTE_DOWNLOAD_URL.replace("${REPO}", repoUrl).replace("${VERSION}", arthasVersion);
|
||||||
AnsiLog.info("Start download arthas from remote server: " + remoteDownloadUrl);
|
AnsiLog.info("Start download arthas from remote server: " + remoteDownloadUrl);
|
||||||
saveUrl(tempFile.getAbsolutePath(), remoteDownloadUrl, true);
|
saveUrl(tempFile.getAbsolutePath(), remoteDownloadUrl, true);
|
||||||
@ -176,7 +178,7 @@ public class DownloadUtils {
|
|||||||
fout.write(data, 0, count);
|
fout.write(data, 0, count);
|
||||||
}
|
}
|
||||||
} catch (javax.net.ssl.SSLException e) {
|
} catch (javax.net.ssl.SSLException e) {
|
||||||
AnsiLog.error("TLS connect error, please try to use --use-http argument.");
|
AnsiLog.error("TLS connect error, please try to add --use-http argument.");
|
||||||
AnsiLog.error("URL: " + urlString);
|
AnsiLog.error("URL: " + urlString);
|
||||||
AnsiLog.error(e);
|
AnsiLog.error(e);
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user