Commit 63f84068 authored by yanzg's avatar yanzg

将源码打包进jar包

parent f9697a48
...@@ -83,9 +83,7 @@ public class AspectLogResult { ...@@ -83,9 +83,7 @@ public class AspectLogResult {
String json = JsonHelper.serialize(responseResult); String json = JsonHelper.serialize(responseResult);
Log.error(cls, resultEx, "%s [ %s ] time %d ms, result: %s", tag, url, time, aspectLogBody.getMaxString(json)); Log.error(cls, resultEx, "%s [ %s ] time %d ms, result: %s", tag, url, time, aspectLogBody.getMaxString(json));
if (isError) { logLocal.result(log, responseResult.getCode(), json, isError);
logLocal.result(log, responseResult.getCode(), json);
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
......
...@@ -76,11 +76,12 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -76,11 +76,12 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
/** /**
* 写入状态 * 写入状态
* *
* @param log 日志对象 * @param log 日志对象
* @param status 状态 * @param status 状态
* @param result 结果 * @param result 结果
* @param isError 是否出错
*/ */
public void result(LogVo log, String status, String result) { public void result(LogVo log, String status, String result, boolean isError) {
if (log == null) { if (log == null) {
return; return;
} }
...@@ -89,7 +90,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -89,7 +90,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
if (isLog) { if (isLog) {
this.remove(log); this.remove(log);
} else { } else {
this.result(log, status, result, true); this.resultWrite(log, status, result, isError);
} }
} }
...@@ -101,7 +102,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -101,7 +102,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param result 结果 * @param result 结果
* @param write 写入 * @param write 写入
*/ */
private void result(LogVo log, String status, String result, boolean write) { private void resultWrite(LogVo log, String status, String result, boolean write) {
if (log == null || StringHelper.isEmpty(log.getLogId())) { if (log == null || StringHelper.isEmpty(log.getLogId())) {
return; return;
} }
...@@ -131,7 +132,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -131,7 +132,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param log 删除日志 * @param log 删除日志
*/ */
private void remove(LogVo log) { private void remove(LogVo log) {
this.result(log, StringHelper.EMPTY, StringHelper.EMPTY, false); this.resultWrite(log, StringHelper.EMPTY, StringHelper.EMPTY, false);
} }
/** /**
...@@ -140,7 +141,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean { ...@@ -140,7 +141,7 @@ public class LogLocal implements ThreadNext.Next, InitializingBean {
* @param timeout 超时对象 * @param timeout 超时对象
*/ */
private void writeTimeout(Timeout<LogVo> timeout) { private void writeTimeout(Timeout<LogVo> timeout) {
this.result(timeout.getData(), MAX_TIME, MAX_TIME_NAME, true); this.resultWrite(timeout.getData(), MAX_TIME, MAX_TIME_NAME, true);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment