1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add node.js version to startup log msgs for debug.

This commit is contained in:
dceejay 2015-02-23 19:27:35 +00:00
parent e8666827e6
commit dc7701ad70

View File

@ -55,10 +55,11 @@ function start() {
reportMetrics();
}, 15000);
}
console.log("\nWelcome to Node-RED\n===================\n");
console.log("\n\n Welcome to Node-RED\n ===================\n");
if (settings.version) {
log.info("Version: "+settings.version);
log.info("Node-RED version: v"+settings.version);
}
log.info("Node.js version: "+process.version);
log.info("Loading palette nodes");
redNodes.init(settings,storage);
redNodes.load().then(function() {
@ -203,20 +204,20 @@ function uninstallModule(module) {
function reportMetrics() {
var memUsage = process.memoryUsage();
// only need to init these once per report
var metrics = {};
metrics.level = log.METRIC;
//report it
metrics.event = "runtime.memory.rss"
metrics.value = memUsage.rss;
log.log(metrics);
metrics.event = "runtime.memory.heapTotal"
metrics.value = memUsage.heapTotal;
log.log(metrics);
metrics.event = "runtime.memory.heapUsed"
metrics.value = memUsage.heapUsed;
log.log(metrics);