From 15c56d3f6489c1404fa51dc1086ce2f8c2142105 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Thu, 12 May 2022 23:03:31 +0200 Subject: [PATCH] Use new debug() functions --- lib/www/server/lib/db/navdata/save.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/www/server/lib/db/navdata/save.js b/lib/www/server/lib/db/navdata/save.js index ee34787..e1e607e 100644 --- a/lib/www/server/lib/db/navdata/save.js +++ b/lib/www/server/lib/db/navdata/save.js @@ -1,7 +1,6 @@ // FIXME This code is in painful need of refactoring -const debug = require("DOUGAL_ROOT/debug")(__filename); -const debug_candidates = debug.extend("candidates"); +const { DEBUG } = require("DOUGAL_ROOT/debug")(__filename); const { setSurvey, transaction, pool } = require('../connection'); let last_tstamp = 0; @@ -255,7 +254,7 @@ async function save (navData, opts = {}) { }); return obj; }).filter(c => !!c); - debug_candidates("%j", candidates); + DEBUG("Candidates: %j", candidates); // console.log("CANDIDATES", candidates); if (candidates.length == 0) {