diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7a49e..ed42d05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,7 @@ This source code is licensed under Apache 2.0 License. - fix: allow normal startup without any mapper files. - fix: Limit the node type obtained by `selectById` to the entity class of the interface. - fix: When a node has multiple tags, prioritize using the tag of `resultType`. (Collaborate with [charle004](https://github.com/charle004), [#311](https://github.com/nebula-contrib/ngbatis/pull/311)) +- fix: debugging log output issue [#312](https://github.com/nebula-contrib/ngbatis/issues/312) ## Feature diff --git a/src/main/java/org/nebula/contrib/ngbatis/proxy/MapperProxy.java b/src/main/java/org/nebula/contrib/ngbatis/proxy/MapperProxy.java index e69b5a0..5894f45 100644 --- a/src/main/java/org/nebula/contrib/ngbatis/proxy/MapperProxy.java +++ b/src/main/java/org/nebula/contrib/ngbatis/proxy/MapperProxy.java @@ -219,9 +219,8 @@ public static ResultSet executeWithParameter(ClassModel cm, MethodModel mm, Stri try { localSession = dispatcher.poll(); if (log.isDebugEnabled()) { - StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[6]; - proxyClass = stackTraceElement.getClassName(); - proxyMethod = stackTraceElement.getMethodName(); + proxyClass = cm.getNamespace().getName(); + proxyMethod = mm.getId(); localSessionSpace = localSession.getCurrentSpace(); } @@ -273,9 +272,8 @@ public static ResultSet executeBySessionPool(ClassModel cm, MethodModel mm, Stri try { if (log.isDebugEnabled()) { - StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[6]; - proxyClass = stackTraceElement.getClassName(); - proxyMethod = stackTraceElement.getMethodName(); + proxyClass = cm.getNamespace().getName(); + proxyMethod = mm.getId(); } currentSpace = getSpace(cm, mm, paramsForTemplate);