From 30c38cbafe4061859dc6eb0906910d28c80cccbc Mon Sep 17 00:00:00 2001 From: slguan Date: Mon, 11 Nov 2019 23:32:08 +0800 Subject: [PATCH] update some log format --- src/client/src/TSDBJNIConnector.c | 18 ------------------ src/client/src/tscServer.c | 2 +- src/client/src/tscSystem.c | 2 +- src/kit/taosdemo/taosdemo.c | 3 +++ src/modules/http/src/httpSystem.c | 2 +- src/modules/monitor/src/monitorSystem.c | 4 ++-- tests/examples/JDBC/readme.md | 2 +- 7 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/client/src/TSDBJNIConnector.c b/src/client/src/TSDBJNIConnector.c index 74c4e0a360..a19579b7d4 100644 --- a/src/client/src/TSDBJNIConnector.c +++ b/src/client/src/TSDBJNIConnector.c @@ -289,32 +289,14 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getResultSetImp( return JNI_CONNECTION_NULL; } -<<<<<<< HEAD -<<<<<<< Updated upstream - int num_fields = taos_field_count(tscon); - if (num_fields != 0) { - jlong ret = (jlong)taos_use_result(tscon); - jniTrace("jobj:%p, taos:%p, get resultset:%p", jobj, tscon, (void *)ret); - return ret; -======= -======= ->>>>>>> origin/develop jlong ret = 0; if (tscIsUpdateQuery(tscon)) { ret = 0; // for update query, no result pointer -<<<<<<< HEAD jniTrace("jobj:%p, conn:%p, no result", jobj, tscon); } else { ret = (jlong) taos_use_result(tscon); jniTrace("jobj:%p, conn:%p, get resultset:%p", jobj, tscon, (void *) ret); ->>>>>>> Stashed changes -======= - jniTrace("jobj:%p, taos:%p, no result", jobj, tscon); - } else { - ret = (jlong) taos_use_result(tscon); - jniTrace("jobj:%p, taos:%p, get resultset:%p", jobj, tscon, (void *) ret); ->>>>>>> origin/develop } return ret; diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 49368e4d17..aa80e505d5 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -562,7 +562,7 @@ void *tscProcessMsgFromServer(char *msg, void *ahandle, void *thandle) { void *taosres = tscKeepConn[command] ? pSql : NULL; code = pRes->code ? -pRes->code : pRes->numOfRows; - tscTrace("%p Async SQL result:%d taosres:%p", pSql, code, taosres); + tscTrace("%p Async SQL result:%d res:%p", pSql, code, taosres); /* * Whether to free sqlObj or not should be decided before call the user defined function, since this SqlObj diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 708ceee405..5e383c9d0b 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -176,7 +176,7 @@ void taos_init_imp() { tscConnCache = taosOpenConnCache(tsMaxMeterConnections * 2, taosCloseRpcConn, tscTmr, tsShellActivityTimer * 1000); initialized = 1; - tscTrace("taos client is initialized successfully"); + tscTrace("client is initialized successfully"); tsInsertHeadSize = tsRpcHeadSize + sizeof(SShellSubmitMsg); } diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index df29a72e86..f9fe9efa33 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -30,6 +30,9 @@ #include #include "taos.h" + +extern char configDir[]; + #pragma GCC diagnostic ignored "-Wmissing-braces" #define BUFFER_SIZE 65536 diff --git a/src/modules/http/src/httpSystem.c b/src/modules/http/src/httpSystem.c index 5c0d9a69d6..ece7c17814 100644 --- a/src/modules/http/src/httpSystem.c +++ b/src/modules/http/src/httpSystem.c @@ -50,7 +50,7 @@ int httpInitSystem() { httpServer = (HttpServer *)malloc(sizeof(HttpServer)); memset(httpServer, 0, sizeof(HttpServer)); - strcpy(httpServer->label, "taosh"); + strcpy(httpServer->label, "rest"); strcpy(httpServer->serverIp, tsHttpIp); httpServer->serverPort = tsHttpPort; httpServer->cacheContext = tsHttpCacheSessions; diff --git a/src/modules/monitor/src/monitorSystem.c b/src/modules/monitor/src/monitorSystem.c index 013d86050e..78cee40f96 100644 --- a/src/modules/monitor/src/monitorSystem.c +++ b/src/modules/monitor/src/monitorSystem.c @@ -131,7 +131,7 @@ void monitorInitConn(void *para, void *unused) { void monitorInitConnCb(void *param, TAOS_RES *result, int code) { if (code < 0) { - monitorError("monitor:%p, connect to taosd failed, code:%d", monitor->conn, code); + monitorError("monitor:%p, connect to database failed, code:%d", monitor->conn, code); taos_close(monitor->conn); monitor->conn = NULL; monitor->state = MONITOR_STATE_UN_INIT; @@ -139,7 +139,7 @@ void monitorInitConnCb(void *param, TAOS_RES *result, int code) { return; } - monitorTrace("monitor:%p, connect to taosd success, code:%d", monitor->conn, code); + monitorTrace("monitor:%p, connect to database success, code:%d", monitor->conn, code); monitorInitDatabase(); } diff --git a/tests/examples/JDBC/readme.md b/tests/examples/JDBC/readme.md index 54a2e5c6ac..a91624a9e4 100644 --- a/tests/examples/JDBC/readme.md +++ b/tests/examples/JDBC/readme.md @@ -9,5 +9,5 @@ TDengine's JDBC driver jar is not yet published to maven center repo, so we need ## Compile the Demo Code and Run It To compile the demo project, go to the source directory ``TDengine/tests/examples/JDBC/JDBCDemo`` and execute
mvn clean assembly:single package
-The ``pom.xml`` is configured to package all the dependencies into one executable jar file. To run it, go to ``TDengine/tests/examples/JDBC/JDBCDemo/target`` and execute +The ``pom.xml`` is configured to package all the dependencies into one executable jar file. To run it, go to ``examples/JDBC/JDBCDemo/target`` and execute
java -jar jdbcdemo-1.0-SNAPSHOT-jar-with-dependencies.jar
-- GitLab