Browse Source

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

hl 9 months ago
parent
commit
48eecca7eb
1 changed files with 3 additions and 1 deletions
  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);
             // process.exit(1);
         } else {
-            logger.info(`--------02`,files)
+            logger.info(`--------02`,files,dirPath)
             let fileList = [];
             for (file of files) {
                 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});
             }
             logger.info(`--------03`)