core: diag: add time to output

This commit is contained in:
undefined committed 2025-12-09 16:32:08 +08:00
1 parent 770b2fc2ec
commit 5ba7e0016e
3 files changed
+6 -1

No files matched your search

+3 -1
View File
@@ -110,11 +110,13 @@ ${padEnd(formatSeconds(Math.floor((Date.now() - i.pm2_env.pm_uptime) / 1000), fa
infoDetails[key] = e.message;
}
}));
infoDetails['now'] = new Date().toISOString();
infos['now'] = new Date().toISOString();
logger.info('System info:');
console.log(yaml.dump(infos, { noCompatMode: true, noArrayIndent: true, lineWidth: process.stdout.columns || 80 }));
logger.info('Uploading detail to pastebin...');
const tmpFile = path.join(tmpdir(), 'report.yaml');
fs.writeFileSync(tmpFile, yaml.dump(infoDetails, { noArrayIndent: true, lineWidth: 150 }));
fs.writeFileSync(tmpFile, yaml.dump(infoDetails, { noArrayIndent: true, lineWidth: 300 }));
if (process.env.VSCODE_INJECTION) {
try {
child.exec(`code ${tmpFile}`);