From ef8cffc1b835d42b7405c1f46ea444652bcd87bf Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 22 Jun 2021 14:26:12 +0800 Subject: [PATCH] logfile name for tmq --- src/client/src/tscSystem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index bd79f81846..355f8a403c 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -45,6 +45,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process. static void *tscCheckDiskUsageTmr; void *tscRpcCache; // cache to keep rpc obj int32_t tscNumOfThreads = 1; // num of rpc threads +char tscLogFileName[12] = "taoslog"; static pthread_mutex_t rpcObjMutex; // mutex to protect open the rpc obj concurrently static pthread_once_t tscinit = PTHREAD_ONCE_INIT; static volatile int tscInitRes = 0; @@ -132,7 +133,7 @@ void taos_init_imp(void) { printf("failed to create log dir:%s\n", tsLogDir); } - sprintf(temp, "%s/taoslog", tsLogDir); + sprintf(temp, "%s/%s", tsLogDir, tscLogFileName); if (taosInitLog(temp, tsNumOfLogLines, 10) < 0) { printf("failed to open log file in directory:%s\n", tsLogDir); }