|
@@ -109,14 +109,14 @@ function cacheLogs() {
|
|
|
const jsonString = JSON.stringify(messlist);
|
|
|
const byteSize = Buffer.byteLength(jsonString, 'utf8');
|
|
|
const megabyteSize = byteSize / (1024 * 1024);
|
|
|
- logger.info(`~~~缓存日志${value.id}--占用大小:${megabyteSize} M`)
|
|
|
+ logger.info(`~~~缓存日志${value.id}--占用大小:${megabyteSize.toFixed(6)} M`)
|
|
|
try {
|
|
|
var logPath = "./logs" + port
|
|
|
- logger.info(`访问-日志相对目录:${logPath}`)
|
|
|
+ // logger.info(`访问-日志相对目录:${logPath}`)
|
|
|
const directoryPath = path.resolve(logPath);
|
|
|
file.checkPathSync(directoryPath)
|
|
|
file.getLastFile(logPath, 3, (fileNameList, _) => {
|
|
|
- logger.info('-----文件:', fileNameList);
|
|
|
+ // logger.info('-----文件:', fileNameList);
|
|
|
file.getLatestLogEntries(logPath, fileNameList.reverse(), n)
|
|
|
.then((result) => {
|
|
|
if (messlist.length === 0) {
|
|
@@ -152,7 +152,7 @@ function cachePredictorState() {
|
|
|
const jsonString = JSON.stringify(predictorState);
|
|
|
const byteSize = Buffer.byteLength(jsonString, 'utf8');
|
|
|
const megabyteSize = byteSize / (1024 * 1024);
|
|
|
- logger.info(`~~~缓存机器人状态详情${value.id}--占用大小:${megabyteSize} M`)
|
|
|
+ logger.info(`~~~缓存机器人状态详情${value.id}--占用大小:${megabyteSize.toFixed(6)} M`)
|
|
|
var accUrl = "http://127.0.0.1:" + port
|
|
|
http.request_get(`${accUrl}/predictor_state`, {...config.headers})
|
|
|
.then((data) => {
|