diff --git a/src/util/src/tlog.c b/src/util/src/tlog.c index b8430f220cbd2874f8950bfe9b24e736a8ccdcf5..45ff14ffa4adcd018cbf7a7d69b8644582855ab3 100644 --- a/src/util/src/tlog.c +++ b/src/util/src/tlog.c @@ -96,7 +96,6 @@ static SLogBuff *taosLogBuffNew(int32_t bufSize); static void taosCloseLogByFd(int32_t oldFd); static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum); extern void taosPrintGlobalCfg(); -static volatile int8_t tsNoDisk = 0; static int32_t taosStartLog() { pthread_attr_t threadAttr; @@ -366,17 +365,9 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) { void taosPrintLog(const char *flags, int32_t dflag, const char *format, ...) { if (tsTotalLogDirGB != 0 && tsAvailLogDirGB < tsMinimalLogDirGB) { - char buf[256] = "\0"; - sprintf(buf, "server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", tsLogDir, tsAvailLogDirGB, - tsTotalLogDirGB); - if (atomic_val_compare_exchange_8(&tsNoDisk, 0, 1) == 1) { - taosWrite(tsLogObj.logHandle->fd, buf, (uint32_t)strlen(buf)); - } - puts(buf); + printf("server disk:%s space remain %.3f GB, total %.1f GB, stop print log.\n", tsLogDir, tsAvailLogDirGB, tsTotalLogDirGB); fflush(stdout); return; - } else { - atomic_store_8(&tsNoDisk, 0); } va_list argpointer;