|
@@ -105,7 +105,7 @@ function cacheLogs() {
|
|
}, intervalInMilliseconds);
|
|
}, intervalInMilliseconds);
|
|
}
|
|
}
|
|
|
|
|
|
-async function zz(value) {
|
|
|
|
|
|
+ function zz(value) {
|
|
var thisTime = new Date().getTime()
|
|
var thisTime = new Date().getTime()
|
|
let port = value.port
|
|
let port = value.port
|
|
let n = 200
|
|
let n = 200
|
|
@@ -118,9 +118,9 @@ async function zz(value) {
|
|
logger.info(`访问-日志相对目录:${logPath}`)
|
|
logger.info(`访问-日志相对目录:${logPath}`)
|
|
const directoryPath = path.resolve(logPath);
|
|
const directoryPath = path.resolve(logPath);
|
|
file.checkPathSync(directoryPath)
|
|
file.checkPathSync(directoryPath)
|
|
- file.getLastFile(logPath, 5, async (fileNameList, _) => {
|
|
|
|
|
|
+ file.getLastFile(logPath, 5, (fileNameList, _) => {
|
|
logger.info('-----文件:', fileNameList);
|
|
logger.info('-----文件:', fileNameList);
|
|
- let result = await file.getLatestLogEntries(logPath, fileNameList.reverse(), n);
|
|
|
|
|
|
+ let result = file.getLatestLogEntries(logPath, fileNameList.reverse(), n);
|
|
if (messlist.length === 0) {
|
|
if (messlist.length === 0) {
|
|
value.messlist = result
|
|
value.messlist = result
|
|
} else {
|
|
} else {
|