|
6 | 6 | import com.codingapi.tx.client.support.common.TransactionUnitTypeList; |
7 | 7 | import com.codingapi.tx.client.support.common.cache.TransactionAttachmentCache; |
8 | 8 | import com.codingapi.tx.commons.exception.BeforeBusinessException; |
| 9 | +import com.codingapi.tx.commons.util.Transactions; |
9 | 10 | import com.codingapi.tx.logger.TxLogger; |
10 | 11 | import lombok.extern.slf4j.Slf4j; |
11 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -64,22 +65,22 @@ public Object transactionRunning(TxTransactionInfo info) throws Throwable { |
64 | 65 |
|
65 | 66 | try { |
66 | 67 | // 5.2 业务执行前 |
67 | | - txLogger.trace(info.getGroupId(), info.getUnitId(), "transaction", "pre service business code"); |
| 68 | + txLogger.trace(info.getGroupId(), info.getUnitId(), Transactions.TAG_TRANSACTION, "pre service business code"); |
68 | 69 | lcnTransactionControl.preBusinessCode(info); |
69 | 70 | // 5.3 执行业务 |
70 | | - txLogger.trace(info.getGroupId(), info.getUnitId(), "transaction", "do service business code"); |
| 71 | + txLogger.trace(info.getGroupId(), info.getUnitId(), Transactions.TAG_TRANSACTION, "do service business code"); |
71 | 72 | Object result = lcnTransactionControl.doBusinessCode(info); |
72 | 73 |
|
73 | 74 | // 5.4 业务执行成功 |
74 | | - txLogger.trace(info.getGroupId(), info.getUnitId(), "transaction", "service business success"); |
| 75 | + txLogger.trace(info.getGroupId(), info.getUnitId(), Transactions.TAG_TRANSACTION, "service business success"); |
75 | 76 | lcnTransactionControl.onBusinessCodeSuccess(info, result); |
76 | 77 | return result; |
77 | 78 | } catch (BeforeBusinessException e) { |
78 | 79 | log.error("business", e); |
79 | 80 | throw e; |
80 | 81 | } catch (Throwable e) { |
81 | 82 | // 5.5 业务执行失败 |
82 | | - txLogger.trace(info.getGroupId(), info.getUnitId(), "transaction", "business code error"); |
| 83 | + txLogger.trace(info.getGroupId(), info.getUnitId(), Transactions.TAG_TRANSACTION, "business code error"); |
83 | 84 | lcnTransactionControl.onBusinessCodeError(info, e); |
84 | 85 | throw e; |
85 | 86 | } finally { |
|
0 commit comments