opt:日志优化
This commit is contained in:
@@ -42,7 +42,6 @@ public class AsyncLuceneAppender extends AspectLogbackAsyncAppender {
|
||||
if (mdcPropertyMap.getClass().getName().contains("SynchronizedMap")){
|
||||
mdcPropertyMap.put("traceId",traceId);
|
||||
}
|
||||
MDC.clear();
|
||||
}
|
||||
super.append(event);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RedissonUtils {
|
||||
ex.printStackTrace();
|
||||
throw ex;
|
||||
}finally {
|
||||
if (isLock){
|
||||
if (isLock && lock.isHeldByCurrentThread()){
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class DruidFilter extends FilterEventAdapter {
|
||||
try {
|
||||
count=statement.getUpdateCount();
|
||||
}catch (Exception ex){ }
|
||||
if (StringUtils.isNotBlank(traceId) && count>0) {
|
||||
if (count>0) {
|
||||
if (size > 0) {
|
||||
Collection<JdbcParameter> values = statement.getParameters().values();
|
||||
List<Object> params = new ArrayList<>();
|
||||
@@ -64,7 +64,7 @@ public class DruidFilter extends FilterEventAdapter {
|
||||
ResultSetProxy rs = super.statement_getResultSet(chain, statement);
|
||||
String executeSql = statement.getLastExecuteSql();
|
||||
String traceId = MDC.get("traceId");
|
||||
if (StringUtils.isNotBlank(traceId)){
|
||||
if (true){
|
||||
int result = 0;
|
||||
if (rs != null) {
|
||||
ResultSetImpl rss = rs.getResultSetRaw().unwrap(ResultSetImpl.class);
|
||||
|
||||
Reference in New Issue
Block a user