|
@@ -74,7 +74,7 @@ function init() {
|
|
|
const n = param.n
|
|
|
const id = param.id
|
|
|
|
|
|
- var port = -1;
|
|
|
+ var port = 1111;
|
|
|
robot.appMap.forEach((value, key) => {
|
|
|
// logger.info(JSON.stringify(value))
|
|
|
if (value.id + "" === id + "") {
|
|
@@ -91,10 +91,10 @@ function init() {
|
|
|
try {
|
|
|
file.checkPathSync(directoryPath)
|
|
|
|
|
|
- file.getLastFile(logPath, 500, async (fileNameList, _) => {
|
|
|
+ file.getLastFile(logPath, 5, async (fileNameList, _) => {
|
|
|
// logger.info('cccccccccccccc文件:', fileNameList);
|
|
|
- result = await file.readLastNLines(logPath, fileNameList, n);
|
|
|
- // result = await file.getRecentLogs(logPath,fileNameList.reverse(),n);
|
|
|
+ // result = await file.readLastNLines(logPath, fileNameList, n);
|
|
|
+ result = await file.getRecentLogs(logPath,fileNameList.reverse(),n);
|
|
|
|
|
|
// logger.info('?????:', result);
|
|
|
res.send({'code': 200, 'data': result, "message": "SUCCESS"});
|