replace debug() with our custom logger

mostly we want trace() and log(). trace() can be enabled whenever
we want by flipping a flag and restarting box
This commit is contained in:
Girish Ramakrishnan
2026-03-12 22:55:28 +05:30
parent d57554a48c
commit 01d0c738bc
104 changed files with 1187 additions and 1174 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
import assert from 'node:assert';
import BoxError from '../boxerror.js';
import debugModule from 'debug';
import logger from '../logger.js';
import dig from '../dig.js';
import dns from '../dns.js';
import safe from 'safetydance';
import waitForDns from './waitfordns.js';
const debug = debugModule('box:dns/manual');
const { log, trace } = logger('dns/manual');
function removePrivateFields(domainObject) {
@@ -24,7 +24,7 @@ async function upsert(domainObject, location, type, values) {
assert.strictEqual(typeof type, 'string');
assert(Array.isArray(values));
debug('upsert: %s for zone %s of type %s with values %j', location, domainObject.zoneName, type, values);
log('upsert: %s for zone %s of type %s with values %j', location, domainObject.zoneName, type, values);
return;
}