mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 00:23:12 +09:00
Reduced log spam
This commit is contained in:
1 parent
4fed43bad6
commit
9461978a6e
3 files changed
+4
-4
No files matched your search
@@ -716,7 +716,7 @@ function instanceManagement() {
|
|||||||
console.log("##### getMac crashed, but we don't really give a shit because we are probably closing down #####");
|
console.log("##### getMac crashed, but we don't really give a shit because we are probably closing down #####");
|
||||||
}
|
}
|
||||||
payload.mac = mac;
|
payload.mac = mac;
|
||||||
console.log("Registered our presence with master "+config.masterIP+" at " + payload.time);
|
// console.log("Registered our presence with master "+config.masterIP+" at " + payload.time);
|
||||||
needle.post(config.masterIP + ":" + config.masterPort + '/api/getID', payload, needleOptionsWithTokenAuthHeader, function (err, response, body) {
|
needle.post(config.masterIP + ":" + config.masterPort + '/api/getID', payload, needleOptionsWithTokenAuthHeader, function (err, response, body) {
|
||||||
if (err && err.code != "ECONNRESET"){
|
if (err && err.code != "ECONNRESET"){
|
||||||
console.error("We got problems, something went wrong when contacting master"+config.masterIP+" at " + payload.time);
|
console.error("We got problems, something went wrong when contacting master"+config.masterIP+" at " + payload.time);
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ app.post("/api/getID", authenticate.middleware, function(req,res) {
|
|||||||
slaves[req.body.unique][k] = req.body[k];
|
slaves[req.body.unique][k] = req.body[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("Slave registered: " + slaves[req.body.unique].mac + " : " + slaves[req.body.unique].serverPort+" at " + slaves[req.body.unique].publicIP + " with name " + slaves[req.body.unique].instanceName);
|
// console.log("Slave registered: " + slaves[req.body.unique].mac + " : " + slaves[req.body.unique].serverPort+" at " + slaves[req.body.unique].publicIP + " with name " + slaves[req.body.unique].instanceName);
|
||||||
}
|
}
|
||||||
httpRequestDurationMilliseconds.labels(req.route.path).observe(Date.now()-reqStartTime);
|
httpRequestDurationMilliseconds.labels(req.route.path).observe(Date.now()-reqStartTime);
|
||||||
});
|
});
|
||||||
@@ -362,7 +362,7 @@ app.post("/api/editSlaveMeta", authenticate.middleware, function(req,res) {
|
|||||||
slaves[req.body.instanceID].meta = deepmerge(slaves[req.body.instanceID].meta, req.body.meta, {clone:true});
|
slaves[req.body.instanceID].meta = deepmerge(slaves[req.body.instanceID].meta, req.body.meta, {clone:true});
|
||||||
let metaPortion = JSON.stringify(req.body.meta);
|
let metaPortion = JSON.stringify(req.body.meta);
|
||||||
if(metaPortion.length > 50) metaPortion = metaPortion.substring(0,20) + "...";
|
if(metaPortion.length > 50) metaPortion = metaPortion.substring(0,20) + "...";
|
||||||
console.log("Updating slave "+slaves[req.body.instanceID].instanceName+": " + slaves[req.body.instanceID].mac + " : " + slaves[req.body.instanceID].serverPort+" at " + slaves[req.body.instanceID].publicIP, metaPortion);
|
// console.log("Updating slave "+slaves[req.body.instanceID].instanceName+": " + slaves[req.body.instanceID].mac + " : " + slaves[req.body.instanceID].serverPort+" at " + slaves[req.body.instanceID].publicIP, metaPortion);
|
||||||
} else {
|
} else {
|
||||||
res.send("ERROR: Invalid instanceID or password")
|
res.send("ERROR: Invalid instanceID or password")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class inventoryImports {
|
|||||||
this.messageInterface = messageInterface;
|
this.messageInterface = messageInterface;
|
||||||
messageInterface("/silent-command game.print('InventoryImports enabled')");
|
messageInterface("/silent-command game.print('InventoryImports enabled')");
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
messageInterface("Polling inventories\n")
|
// messageInterface("Polling inventories\n")
|
||||||
messageInterface(functions.pollInventories(pluginConfig.scriptOutputFileSubscription));
|
messageInterface(functions.pollInventories(pluginConfig.scriptOutputFileSubscription));
|
||||||
}, 10000);
|
}, 10000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user