|
@@ -95,11 +95,10 @@ function init() {
|
|
|
if (port !== -1) {
|
|
|
var logPath = "./logs" + port
|
|
|
// 将相对路径转换为绝对路径
|
|
|
- const directoryPath = path.resolve(logPath);
|
|
|
// file.checkPathSync(directoryPath)
|
|
|
-
|
|
|
- logger.info(`日志相对地址:${logPath}`)
|
|
|
try {
|
|
|
+ const directoryPath = path.resolve(logPath);
|
|
|
+ logger.info(`日志相对地址:${logPath}`)
|
|
|
file.getLastFile(logPath, 10, (fileNameList) => {
|
|
|
// logger.info('??1:', fileNameList);
|
|
|
result = file.readLastNLines(logPath, fileNameList, n);
|