You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/12/14 11:48:53 UTC

[iotdb] branch master updated: change null pointer log way (#2266)

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 8da5cdf  change null pointer log way (#2266)
8da5cdf is described below

commit 8da5cdfc0baa5c6f2aa35fba6c7aded623d67072
Author: Jackie Tien <Ja...@foxmail.com>
AuthorDate: Mon Dec 14 19:48:38 2020 +0800

    change null pointer log way (#2266)
---
 server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index 7368393..6e75bfb 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -772,9 +772,10 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
 
       return resp;
     } catch (Exception e) {
-      logger.warn("{}: Internal server error: ", IoTDBConstant.GLOBAL_DB_NAME, e);
       if (e instanceof NullPointerException) {
-        e.printStackTrace();
+        logger.error("{}: Internal server error: ", IoTDBConstant.GLOBAL_DB_NAME, e);
+      } else {
+        logger.warn("{}: Internal server error: ", IoTDBConstant.GLOBAL_DB_NAME, e);
       }
       if (queryId != -1) {
         try {