🔊 完善日志输出

This commit is contained in:
赵俊
2021-04-11 16:02:49 +08:00
parent 81f9e262f5
commit a9fbf54bb2
2 changed files with 3 additions and 3 deletions

View File

@@ -147,7 +147,7 @@ public abstract class MicrosoftDriveServiceBase extends AbstractBaseFileService
try {
root = oneDriveRestTemplate.exchange(requestUrl, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
} catch (HttpClientErrorException e) {
log.debug("调用 OneDrive 时出现了网络异常, 已尝试重新刷新 token 后再试.");
log.debug("调用 OneDrive 时出现了网络异常, 响应信息: {}, 已尝试重新刷新 token 后再试.", e.getResponseBodyAsString());
refreshOneDriveToken();
root = oneDriveRestTemplate.exchange(requestUrl, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
}
@@ -201,7 +201,7 @@ public abstract class MicrosoftDriveServiceBase extends AbstractBaseFileService
try {
fileItem = oneDriveRestTemplate.exchange(DRIVER_ITEM_URL, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
} catch (HttpClientErrorException e) {
log.debug("调用 OneDrive 时出现了网络异常, 已尝试重新刷新 token 后再试.");
log.debug("调用 OneDrive 时出现了网络异常, 响应信息: {}, 已尝试重新刷新 token 后再试.", e.getResponseBodyAsString());
refreshOneDriveToken();
fileItem = oneDriveRestTemplate.exchange(DRIVER_ITEM_URL, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
}

View File

@@ -37,7 +37,7 @@ public class HttpUtil {
try {
result = restTemplate.getForObject(url, String.class);
} catch (Exception e) {
throw new TextParseException("文件解析异常");
throw new TextParseException("文件解析异常, 请求 url = " + url + ", 异常信息为 = " + e.getMessage());
}
return result == null ? "" : result;