添加详细日志
This commit is contained in:
1 parent
21a23c9f55
commit
637be83684
1 file changed
+10
-1
@@ -70,7 +70,10 @@ public class ChainExecutorClient {
|
||||
http = createHttp(ChainExecutorTls.socketFactory(tlsCertificateLocation, new DefaultResourceLoader()));
|
||||
log.info("已加载内网链上执行器HTTPS信任证书");
|
||||
} catch (Exception invalidCertificate) {
|
||||
throw new IllegalArgumentException("内网链上执行器TLS证书加载失败,请检查本地证书路径、格式和有效期");
|
||||
String cause = rootType(invalidCertificate);
|
||||
log.error("内网链上执行器TLS证书加载失败,异常类型={}", cause);
|
||||
throw new IllegalArgumentException("内网链上执行器TLS证书加载失败[" + cause
|
||||
+ "],请检查file:/classpath:路径、读取权限、X.509格式和有效期");
|
||||
}
|
||||
}
|
||||
log.info("内网链上执行通道已启用,开始验证执行器服务,传输协议={}", target.getScheme().toUpperCase());
|
||||
@@ -133,6 +136,12 @@ public class ChainExecutorClient {
|
||||
return cause.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
private static String rootType(Throwable failure) {
|
||||
Throwable cause = failure;
|
||||
while (cause.getCause() != null && cause.getCause() != cause) cause = cause.getCause();
|
||||
return cause.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
private HttpHeaders headers() {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Authorization", "Bearer " + token);
|
||||
|
||||
Reference in new issue
Block a user