diff --git a/CHANGELOG.md b/CHANGELOG.md index 3014d88910..3bd7e72d7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ _This release is scheduled to be released on 2024-04-01._ ### Added -- Output of system information to the console for troubleshooting (#3328). +- Output of system information to the console for troubleshooting (#3328 and #3337) ### Updated diff --git a/js/utils.js b/js/utils.js index 38f6ca8ba1..095cc2e88e 100644 --- a/js/utils.js +++ b/js/utils.js @@ -4,6 +4,7 @@ * By Rodrigo Ramírez Norambuena https://rodrigoramirez.com * MIT Licensed. */ +const execSync = require("child_process").execSync; const colors = require("colors/safe"); const Log = require("logger"); const si = require("systeminformation"); @@ -18,12 +19,13 @@ module.exports = { async logSystemInformation () { try { + let installedNodeVersion = execSync("node -v", { encoding: "utf-8" }).replace("v", "").replace(/(?:\r\n|\r|\n)/g, ""); const staticData = await si.getStaticData(); let systemDataString = "System information:"; - systemDataString += `\n ### SYSTEM: manufacturer: ${staticData["system"]["manufacturer"]}; model: ${staticData["system"]["model"]}; raspberry: ${staticData["system"]["raspberry"]}; virtual: ${staticData["system"]["virtual"]}`; - systemDataString += `\n ### OS: platform: ${staticData["os"]["platform"]}; distro: ${staticData["os"]["distro"]}; release: ${staticData["os"]["release"]}; arch: ${staticData["os"]["arch"]}; kernel: ${staticData["versions"]["kernel"]}`; - systemDataString += `\n ### VERSIONS: electron: ${process.versions.electron}; node: ${staticData["versions"]["node"]}; npm: ${staticData["versions"]["npm"]}; pm2: ${staticData["versions"]["pm2"]}; docker: ${staticData["versions"]["docker"]}`; - systemDataString += `\n ### OTHER: timeZone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}`; + systemDataString += `\n### SYSTEM: manufacturer: ${staticData["system"]["manufacturer"]}; model: ${staticData["system"]["model"]}; raspberry: ${staticData["system"]["raspberry"]}; virtual: ${staticData["system"]["virtual"]}`; + systemDataString += `\n### OS: platform: ${staticData["os"]["platform"]}; distro: ${staticData["os"]["distro"]}; release: ${staticData["os"]["release"]}; arch: ${staticData["os"]["arch"]}; kernel: ${staticData["versions"]["kernel"]}`; + systemDataString += `\n### VERSIONS: electron: ${process.versions.electron}; used node: ${staticData["versions"]["node"]}; installed node: ${installedNodeVersion}; npm: ${staticData["versions"]["npm"]}; pm2: ${staticData["versions"]["pm2"]}`; + systemDataString += `\n### OTHER: timeZone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}; ELECTRON_ENABLE_GPU: ${process.env.ELECTRON_ENABLE_GPU}`; Log.info(systemDataString); } catch (e) { Log.error(e); diff --git a/serveronly/index.js b/serveronly/index.js index 3cfa7969d2..66632ac105 100644 --- a/serveronly/index.js +++ b/serveronly/index.js @@ -4,5 +4,5 @@ const Log = require("../js/logger"); app.start().then((config) => { const bindAddress = config.address ? config.address : "localhost"; const httpType = config.useHttps ? "https" : "http"; - Log.log(`\nReady to go! Please point your browser to: ${httpType}://${bindAddress}:${config.port}`); + Log.info(`\n>>> Ready to go! Please point your browser to: ${httpType}://${bindAddress}:${config.port} <<<`); });