Browse Source

获取日志存在bug ,正在排查~~~

hl 9 tháng trước cách đây
mục cha
commit
89c0966c35
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/utils/file.js

+ 2 - 0
src/utils/file.js

@@ -101,11 +101,13 @@ function getLastFile(dirPath, number, callback) {
             logger.info(`--------02`,files,dirPath)
             let fileList = [];
             for (file of files) {
+                logger.info(`--------02..00`,dirPath,file)
                 const filePath = path.join(dirPath, file);
                 logger.info(`--------02..111`,filePath)
                 const stats = await fs.promises.stat(filePath);
                 logger.info(`--------02..22222`,stats)
                 fileList.push({name: file, time: stats.mtimeMs});
+                break
             }
             logger.info(`--------03`)
             fileList.sort((a, b) => b.time - a.time);