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:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user