Browse Source

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

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

+ 3 - 1
src/utils/file.js

@@ -98,11 +98,13 @@ function getLastFile(dirPath, number, callback) {
             logger.error(`无法列出目录。`, err);
             logger.error(`无法列出目录。`, err);
             // process.exit(1);
             // process.exit(1);
         } else {
         } else {
-            logger.info(`--------02`,files)
+            logger.info(`--------02`,files,dirPath)
             let fileList = [];
             let fileList = [];
             for (file of files) {
             for (file of files) {
                 const filePath = path.join(dirPath, file);
                 const filePath = path.join(dirPath, file);
+                logger.info(`--------02..111`,filePath)
                 const stats = await fs.promises.stat(filePath);
                 const stats = await fs.promises.stat(filePath);
+                logger.info(`--------02..22222`,stats)
                 fileList.push({name: file, time: stats.mtimeMs});
                 fileList.push({name: file, time: stats.mtimeMs});
             }
             }
             logger.info(`--------03`)
             logger.info(`--------03`)