Explorar o código

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

hl hai 9 meses
pai
achega
63e0b474c9
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/utils/file.js

+ 2 - 1
src/utils/file.js

@@ -104,6 +104,7 @@ function getLastFile(dirPath, number, callback) {
             // 按照倒叙获取,如果一个文件内容满足num,就不在继续查询,如果不够,继续获取文件
             for (var i = fileList.length - 1; i >= 0; i--) {
                 var file = fileList[i];
+                logger.info(`--------02..00`, dirPath, file)
                 const filePath = path.join(dirPath, file);
                 const stats = await fs.promises.stat(filePath);
                 fileList.push({name: file, time: stats.mtimeMs});
@@ -114,7 +115,7 @@ function getLastFile(dirPath, number, callback) {
             }
 
             // 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);