diff --git a/src/util/src/tlog.c b/src/util/src/tlog.c index c4597d86ede2a8052bb908382a2806f3fbc574af..599cf3262b61359b05a71087a3b6ad2dde4139cb 100644 --- a/src/util/src/tlog.c +++ b/src/util/src/tlog.c @@ -428,8 +428,12 @@ void taosPrintLongString(const char *flags, int32_t dflag, const char *format, . buffer[len] = 0; if ((dflag & DEBUG_FILE) && tsLogObj.logHandle && tsLogObj.logHandle->fd >= 0) { - taosPushLogBuffer(tsLogObj.logHandle, buffer, len); - + if (tsAsyncLog) { + taosPushLogBuffer(tsLogObj.logHandle, buffer, len); + } else { + twrite(tsLogObj.logHandle->fd, buffer, len); + } + if (tsLogObj.maxLines > 0) { atomic_add_fetch_32(&tsLogObj.lines, 1);