diff --git a/source/libs/index/test/indexTests.cc b/source/libs/index/test/indexTests.cc index 5b76de2ef89fdce4780fcf94a1360d68f7684a9e..08bf84ff60fdc07393abf546630c67dd52f6abc1 100644 --- a/source/libs/index/test/indexTests.cc +++ b/source/libs/index/test/indexTests.cc @@ -271,20 +271,20 @@ void validateFst() { } delete m; } -static std::string logDir = TD_TMP_DIR_PATH "log"; - -static void initLog() { - const char* defaultLogFileNamePrefix = "taoslog"; - const int32_t maxLogFileNum = 10; - tsAsyncLog = 0; - idxDebugFlag = 143; - strcpy(tsLogDir, logDir.c_str()); - taosRemoveDir(tsLogDir); - taosMkDir(tsLogDir); - - if (taosInitLog(defaultLogFileNamePrefix, maxLogFileNum) < 0) { - printf("failed to open log file in directory:%s\n", tsLogDir); +static std::string logDir = TD_TMP_DIR_PATH "log"; +static void initLog() { + const char* defaultLogFileNamePrefix = "taoslog"; + const int32_t maxLogFileNum = 10; + + tsAsyncLog = 0; + idxDebugFlag = 143; + strcpy(tsLogDir, logDir.c_str()); + taosRemoveDir(tsLogDir); + taosMkDir(tsLogDir); + + if (taosInitLog(defaultLogFileNamePrefix, maxLogFileNum) < 0) { + printf("failed to open log file in directory:%s\n", tsLogDir); } } class IndexEnv : public ::testing::Test {