本文整理了Java中com.alipay.sofa.rpc.log.Logger.errorWithApp()
方法的一些代码示例,展示了Logger.errorWithApp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.errorWithApp()
方法的具体详情如下:
包路径:com.alipay.sofa.rpc.log.Logger
类名称:Logger
方法名:errorWithApp
[英]Error with app.
[中]应用程序出错。
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
try {
doReconnect();
} catch (Throwable e) {
LOGGER.errorWithApp(consumerConfig.getAppName(),
"Exception when retry connect to provider", e);
}
}
}, reconnect, reconnect, TimeUnit.MILLISECONDS).start();
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
try {
doReconnect();
} catch (Throwable e) {
LOGGER.errorWithApp(consumerConfig.getAppName(),
"Exception when retry connect to provider", e);
}
}
}, reconnect, reconnect, TimeUnit.MILLISECONDS).start();
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnSubscribe(List<ConsumerConfig> configs) {
// 不支持批量反注册,那就一个个来吧
for (ConsumerConfig config : configs) {
String appName = config.getAppName();
try {
unSubscribe(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unSubscribe", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unregistry", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnSubscribe(List<ConsumerConfig> configs) {
// 不支持批量反注册,那就一个个来吧
for (ConsumerConfig config : configs) {
String appName = config.getAppName();
try {
unSubscribe(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unSubscribe", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unregistry", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unregistry", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnSubscribe(List<ConsumerConfig> configs) {
// 不支持批量反注册,那就一个个来吧
for (ConsumerConfig config : configs) {
String appName = config.getAppName();
try {
unSubscribe(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unSubscribe", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Batch unregister from nacos error", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Batch unregister from nacos error", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnRegister(List<ProviderConfig> configs) {
for (ProviderConfig config : configs) {
String appName = config.getAppName();
try {
unRegister(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unregistry", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void batchUnSubscribe(List<ConsumerConfig> configs) {
// 不支持批量反注册,那就一个个来吧
for (ConsumerConfig config : configs) {
String appName = config.getAppName();
try {
unSubscribe(config);
} catch (Exception e) {
LOGGER.errorWithApp(appName, "Error when batch unSubscribe", e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
/**
* 找不到服务
*
* @param appName 应用
* @param serviceName 服务
* @return 找不到服务的异常响应
*/
private SofaRpcException cannotFoundService(String appName, String serviceName) {
String errorMsg = LogCodes
.getLog(LogCodes.ERROR_PROVIDER_SERVICE_CANNOT_FOUND, serviceName);
LOGGER.errorWithApp(appName, errorMsg);
return new SofaRpcException(RpcErrorType.SERVER_NOT_FOUND_INVOKER, errorMsg);
}
代码示例来源:origin: alipay/sofa-rpc
/**
* 找不到服务
*
* @param appName 应用
* @param serviceName 服务
* @return 找不到服务的异常响应
*/
private SofaRpcException cannotFoundService(String appName, String serviceName) {
String errorMsg = LogCodes
.getLog(LogCodes.ERROR_PROVIDER_SERVICE_CANNOT_FOUND, serviceName);
LOGGER.errorWithApp(appName, errorMsg);
return new SofaRpcException(RpcErrorType.SERVER_NOT_FOUND_INVOKER, errorMsg);
}
代码示例来源:origin: alipay/sofa-rpc
/**
* 找不到服务
*
* @param appName 应用
* @param serviceName 服务
* @return 找不到服务的异常响应
*/
private SofaRpcException cannotFoundService(String appName, String serviceName) {
String errorMsg = LogCodes
.getLog(LogCodes.ERROR_PROVIDER_SERVICE_CANNOT_FOUND, serviceName);
LOGGER.errorWithApp(appName, errorMsg);
return new SofaRpcException(RpcErrorType.SERVER_NOT_FOUND_INVOKER, errorMsg);
}
代码示例来源:origin: alipay/sofa-rpc
/**
* 找不到服务
*
* @param appName 应用
* @param serviceName 服务
* @return 找不到服务的异常响应
*/
private SofaRpcException cannotFoundService(String appName, String serviceName) {
String errorMsg = LogCodes
.getLog(LogCodes.ERROR_PROVIDER_SERVICE_CANNOT_FOUND, serviceName);
LOGGER.errorWithApp(appName, errorMsg);
return new SofaRpcException(RpcErrorType.SERVER_NOT_FOUND_INVOKER, errorMsg);
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
List<MeasureResultDetail> measureResultDetails = measureResult.getAllMeasureResultDetails();
for (MeasureResultDetail measureResultDetail : measureResultDetails) {
try {
doRegulate(measureResultDetail);
} catch (Exception e) {
LOGGER.errorWithApp(measureResult.getMeasureModel().getAppName(),
"Error when doRegulate: " + e.getMessage(), e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
List<MeasureResultDetail> measureResultDetails = measureResult.getAllMeasureResultDetails();
for (MeasureResultDetail measureResultDetail : measureResultDetails) {
try {
doRegulate(measureResultDetail);
} catch (Exception e) {
LOGGER.errorWithApp(measureResult.getMeasureModel().getAppName(),
"Error when doRegulate: " + e.getMessage(), e);
}
}
}
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
// 状态变化通知监听器
for (ConsumerStateListener listener : onAvailable) {
try {
listener.onUnavailable(consumerConfig.getConsumerBootstrap().getProxyIns());
} catch (Exception e) {
LOGGER.errorWithApp(consumerConfig.getAppName(),
"Failed to notify consumer state listener when state change to unavailable");
}
}
}
});
代码示例来源:origin: alipay/sofa-rpc
@Override
public void run() {
// 状态变化通知监听器
for (ConsumerStateListener listener : onAvailable) {
try {
listener.onUnavailable(consumerConfig.getConsumerBootstrap().getProxyIns());
} catch (Exception e) {
LOGGER.errorWithApp(consumerConfig.getAppName(),
"Failed to notify consumer state listener when state change to unavailable");
}
}
}
});
内容来源于网络,如有侵权,请联系作者删除!