Modify logging statements

This commit is contained in:
D. Berge
2023-10-14 20:10:46 +02:00
parent 6f5e5a4d20
commit eee2a96029

View File

@@ -1,7 +1,7 @@
// FIXME This code is in painful need of refactoring // FIXME This code is in painful need of refactoring
const { ALERT, ERROR, WARNING, NOTICE, INFO, DEBUG } = require('DOUGAL_ROOT/debug')(__filename);
const { setSurvey, transaction, pool } = require('../connection'); const { setSurvey, transaction, pool } = require('../connection');
const { ALERT, ERROR, WARNING, NOTICE, INFO, DEBUG } = require('DOUGAL_ROOT/debug')(__filename);
let last_tstamp = 0; let last_tstamp = 0;
@@ -237,7 +237,7 @@ async function getCandidates (navData) {
}); });
return obj; return obj;
}).filter(c => !!c); }).filter(c => !!c);
DEBUG("Candidates: %j", candidates.map(c => c.schema)); // DEBUG("Candidates: %j", candidates.map(c => c.schema));
return candidates; return candidates;
} }
@@ -309,6 +309,7 @@ async function save (navData, opts = {}) {
} }
await saveOffline(navData, opts); await saveOffline(navData, opts);
DEBUG("Saved");
} }
module.exports = save; module.exports = save;