Skip to content
Snippets Groups Projects
Commit 9c5ba4c6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Use -debug command-line option if you want the <area> using ... address log

For Nelgin, to reduce log spam.
parent 935c4832
No related branches found
No related tags found
No related merge requests found
...@@ -29,10 +29,13 @@ require("fido.js", 'FIDO'); ...@@ -29,10 +29,13 @@ require("fido.js", 'FIDO');
var cfgfile; var cfgfile;
var force_replace = false; var force_replace = false;
var use_diz_always = true; var use_diz_always = true;
var debug = false;
for (var i in argv) { for (var i in argv) {
if(argv[i] == "-force-replace") if(argv[i] == "-force-replace")
force_replace = true; force_replace = true;
else if(argv[i] == "-debug")
debug = true;
else if(argv[i][0] != '-') else if(argv[i][0] != '-')
cfgfile = argv[i]; cfgfile = argv[i];
} }
...@@ -764,18 +767,23 @@ function main() { ...@@ -764,18 +767,23 @@ function main() {
for (var i = 0; i < areas.length; i++) { for (var i = 0; i < areas.length; i++) {
var cfg = tickit.acfg[areas[i]]; var cfg = tickit.acfg[areas[i]];
if (cfg !== undefined && cfg.akamatching === true) { if (cfg !== undefined && cfg.akamatching === true) {
log(LOG_DEBUG, areas[i].toUpperCase()+" using area AKA match."); if(debug)
log(LOG_DEBUG, areas[i].toUpperCase()+" using area AKA match.");
} else if (cfg !== undefined && cfg.sourceaddress !== undefined) { } else if (cfg !== undefined && cfg.sourceaddress !== undefined) {
var aaddr = cfg.sourceaddress.toString(); var aaddr = cfg.sourceaddress.toString();
if (aaddr.indexOf("@") > -1) if (aaddr.indexOf("@") > -1)
aaddr = aaddr.slice(0,aaddr.indexOf("@")); aaddr = aaddr.slice(0,aaddr.indexOf("@"));
log(LOG_DEBUG, areas[i].toUpperCase()+" using area source address: "+aaddr); if(debug)
log(LOG_DEBUG, areas[i].toUpperCase()+" using area source address: "+aaddr);
} else if (tickit.gcfg.akamatching) { } else if (tickit.gcfg.akamatching) {
log(LOG_DEBUG, areas[i].toUpperCase()+" using global AKA match."); if(debug)
log(LOG_DEBUG, areas[i].toUpperCase()+" using global AKA match.");
} else if (tickit.gcfg.sourceaddress) { } else if (tickit.gcfg.sourceaddress) {
log(LOG_DEBUG, areas[i].toUpperCase()+" using global source address "+saddr); if(debug)
log(LOG_DEBUG, areas[i].toUpperCase()+" using global source address "+saddr);
} else { } else {
log(LOG_DEBUG, areas[i].toUpperCase()+" using main system address: "+saddr); if(debug)
log(LOG_DEBUG, areas[i].toUpperCase()+" using main system address: "+saddr);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment