Browse Source

优化日志获取

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

+ 1 - 1
src/utils/file.js

@@ -171,7 +171,7 @@ async function readLastNLines(dirPath, filePathList, n) {
 async function readLinesFromEnd(filePath, maxLines) {
     const lines = [];
     const fileSize = fs.statSync(filePath).size;
-    const chunkSize = 1024; // 每次读取的块大小
+    const chunkSize = 1024*10*5; // 每次读取的块大小