diff --git a/kernel-d-log/log-business/src/main/java/cn/stylefeng/roses/kernel/log/business/util/BusinessLogUtil.java b/kernel-d-log/log-business/src/main/java/cn/stylefeng/roses/kernel/log/business/util/BusinessLogUtil.java index effb1e22b..6c3ea76bd 100644 --- a/kernel-d-log/log-business/src/main/java/cn/stylefeng/roses/kernel/log/business/util/BusinessLogUtil.java +++ b/kernel-d-log/log-business/src/main/java/cn/stylefeng/roses/kernel/log/business/util/BusinessLogUtil.java @@ -36,15 +36,19 @@ public class BusinessLogUtil { if (ObjectUtil.isEmpty(contentObject)) { return; } - StringBuilder stringBuffer = new StringBuilder(); - for (Object param : contentObject) { - if (param instanceof String) { - stringBuffer.append(param); - } else { - stringBuffer.append(JSON.toJSONString(param)); + try { + StringBuilder stringBuffer = new StringBuilder(); + for (Object param : contentObject) { + if (param instanceof String) { + stringBuffer.append(param); + } else { + stringBuffer.append(JSON.toJSONString(param)); + } } + BusinessLogHolder.addContent(stringBuffer.toString()); + } catch (Exception e) { + // ignore } - BusinessLogHolder.addContent(stringBuffer.toString()); } }