Skip to content

Commit

Permalink
fix: debugging log output issue #312
Browse files Browse the repository at this point in the history
  • Loading branch information
CorvusYe committed Aug 21, 2024
1 parent 87468cb commit d330b7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 4 additions & 6 deletions src/main/java/org/nebula/contrib/ngbatis/proxy/MapperProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d330b7c

Please sign in to comment.