Repository navigation
SCB-2360 Provides a unified switch to control exception stack printing - #2644
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2644 +/- ##
============================================
- Coverage 77.70% 77.68% -0.03%
Complexity 1429 1429
============================================
Files 1598 1598
Lines 42727 42740 +13
Branches 3602 3606 +4
============================================
+ Hits 33201 33202 +1
- Misses 8019 8027 +8
- Partials 1507 1511 +4
Continue to review full report at Codecov.
|
| LOG.warn("fallback failed due to:" + e.getMessage()); | ||
| if (DynamicPropertyFactory.getInstance().getBooleanProperty(Const.PRINT_SENSITIVE_ERROR_MESSAGE, | ||
| false).get()) { | ||
| LOG.warn("fallback failed due to:" + e); |
There was a problem hiding this comment.
LOG.warn("fallback failed due to:" , e);
| false).get()) { | ||
| LOG.warn("fallback failed due to:" + e); | ||
| } else { | ||
| LOG.warn("fallback failed due to:" + e.getMessage()); |
There was a problem hiding this comment.
LOG.warn("fallback failed due to {}", e.getMessage());
| } catch (Exception e) { | ||
| if (DynamicPropertyFactory.getInstance().getBooleanProperty(Const.PRINT_SENSITIVE_ERROR_MESSAGE, | ||
| false).get()) { | ||
| LOGGER.warn("set up spring property source failed. msg", e); |
There was a problem hiding this comment.
LOGGER.warn("set up spring property source failed. ", e);
| invocation.getTraceIdLogger().error(LOGGER, "unexpected error operation={}, message={}", | ||
| invocation.getInvocationQualifiedName(), | ||
| org.apache.servicecomb.foundation.common.utils.ExceptionUtils.getExceptionMessageWithoutTrace(e)); | ||
| if (DynamicPropertyFactory.getInstance().getBooleanProperty(Const.PRINT_SENSITIVE_ERROR_MESSAGE, |
There was a problem hiding this comment.
请问为什么servicecomb.error.printSensitiveErrorMessage=true的时候不使用用invocation.getTraceIdLogger().error打印日志呢?这样打出的异常堆栈没有trace id,根据trace id 查询错误日志的时候会漏掉这个信息呢
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles, where you replaceSCB-XXXwith the appropriate JIRA issue.mvn clean install -Pitto make sure basic checks pass. A more thorough check will be performed on your pull request automatically.