Skip to content

Commit e867e8a

Browse files
committed
英文日志修改
1 parent 9f08fbf commit e867e8a

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

tx-manager/src/main/java/com/codingapi/tm/compensate/service/impl/CompensateServiceImpl.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public boolean saveCompensateMsg(TransactionCompensateMsg transactionCompensateM
6767

6868
final String json = JSON.toJSONString(transactionCompensateMsg);
6969

70-
logger.info("补偿->" + json);
70+
logger.info("Compensate->" + json);
7171

7272
final String compensateKey = compensateDao.saveCompensateMsg(transactionCompensateMsg);
7373

@@ -83,9 +83,9 @@ public void run() {
8383
requestJson.put("json", json);
8484

8585
String url = configReader.getCompensateNotifyUrl();
86-
logger.error("补偿回调地址->" + url);
86+
logger.error("Compensate Callback Address->" + url);
8787
String res = HttpUtils.postJson(url, requestJson.toJSONString());
88-
logger.error("补偿回调结果->" + res);
88+
logger.error("Compensate Callback Result->" + res);
8989
if (configReader.isCompensateAuto()) {
9090
//自动补偿,是否自动执行补偿
9191
if (res.contains("success")||res.contains("SUCCESS")) {
@@ -94,7 +94,7 @@ public void run() {
9494
}
9595
}
9696
} catch (Exception e) {
97-
logger.error("补偿回调失败->" + e.getMessage());
97+
logger.error("Compensate Callback Fails->" + e.getMessage());
9898
}
9999
}
100100
});
@@ -109,16 +109,16 @@ public void run() {
109109

110110
public void autoCompensate(final String compensateKey, TransactionCompensateMsg transactionCompensateMsg) {
111111
final String json = JSON.toJSONString(transactionCompensateMsg);
112-
logger.info("自动补偿->" + json);
112+
logger.info("Auto Compensate->" + json);
113113
//自动补偿业务执行...
114114
final int tryTime = configReader.getCompensateTryTime();
115115
boolean autoExecuteRes = false;
116116
try {
117117
int executeCount = 0;
118118
autoExecuteRes = _executeCompensate(json);
119-
logger.info("自动补偿结果->" + autoExecuteRes + ",json->" + json);
119+
logger.info("Automatic Compensate Result->" + autoExecuteRes + ",json->" + json);
120120
while (!autoExecuteRes) {
121-
logger.info("try补偿(补偿失败,进入补偿队列)->" + autoExecuteRes + ",json->" + json);
121+
logger.info("Compensate Failure, Entering Compensate Queue->" + autoExecuteRes + ",json->" + json);
122122
executeCount++;
123123
if(executeCount==3){
124124
autoExecuteRes = false;
@@ -138,7 +138,7 @@ public void autoCompensate(final String compensateKey, TransactionCompensateMsg
138138
}
139139

140140
}catch (Exception e){
141-
logger.error("自动补偿失败,msg:"+e.getLocalizedMessage());
141+
logger.error("Auto Compensate Fails,msg:"+e.getLocalizedMessage());
142142
//推送数据给第三方通知
143143
autoExecuteRes = false;
144144
}
@@ -151,9 +151,9 @@ public void autoCompensate(final String compensateKey, TransactionCompensateMsg
151151
requestJson.put("resState",autoExecuteRes);
152152

153153
String url = configReader.getCompensateNotifyUrl();
154-
logger.error("补偿结果回调地址->" + url);
154+
logger.error("Compensate Result Callback Address->" + url);
155155
String res = HttpUtils.postJson(url, requestJson.toJSONString());
156-
logger.error("补偿结果回调结果->" + res);
156+
logger.error("Compensate Result Callback Result->" + res);
157157

158158
}
159159

@@ -264,7 +264,7 @@ public void reloadCompensate(TxGroup txGroup) {
264264
}
265265
}
266266

267-
logger.info("加载补偿以后->"+JSON.toJSONString(txGroup));
267+
logger.info("Compensate Loaded->"+JSON.toJSONString(txGroup));
268268
}
269269

270270
private TxGroup getCompensateByGroupId(String groupId) {
@@ -283,7 +283,7 @@ public boolean executeCompensate(String path) throws ServiceException {
283283

284284
String json = compensateDao.getCompensate(path);
285285
if (json == null) {
286-
throw new ServiceException("不存在该数据");
286+
throw new ServiceException("no data existing");
287287
}
288288

289289
boolean hasOk = _executeCompensate(json);
@@ -304,7 +304,7 @@ private boolean _executeCompensate(String json) throws ServiceException {
304304

305305
ModelInfo modelInfo = ModelInfoManager.getInstance().getModelByModel(model);
306306
if (modelInfo == null) {
307-
throw new ServiceException("当前模块不在线.");
307+
throw new ServiceException("current model offline.");
308308
}
309309

310310
String data = jsonObject.getString("data");

0 commit comments

Comments
 (0)