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
@@ -2,13 +2,13 @@ import apps from './apps.js';
|
||||
import assert from 'node:assert';
|
||||
import BoxError from './boxerror.js';
|
||||
import constants from './constants.js';
|
||||
import debugModule from 'debug';
|
||||
import logger from './logger.js';
|
||||
import eventlog from './eventlog.js';
|
||||
import paths from './paths.js';
|
||||
import safe from 'safetydance';
|
||||
import settings from './settings.js';
|
||||
|
||||
const debug = debugModule('box:branding');
|
||||
const { log, trace } = logger('branding');
|
||||
|
||||
|
||||
async function getCloudronName() {
|
||||
@@ -28,7 +28,7 @@ async function setCloudronName(name, auditSource) {
|
||||
|
||||
// mark apps using oidc addon to be reconfigured
|
||||
const [, installedApps] = await safe(apps.list());
|
||||
await safe(apps.configureApps(installedApps.filter((a) => !!a.manifest.addons?.oidc), { scheduleNow: true }, auditSource), { debug });
|
||||
await safe(apps.configureApps(installedApps.filter((a) => !!a.manifest.addons?.oidc), { scheduleNow: true }, auditSource), { debug: log });
|
||||
|
||||
await settings.set(settings.CLOUDRON_NAME_KEY, name);
|
||||
await eventlog.add(eventlog.ACTION_BRANDING_NAME, auditSource, { name });
|
||||
|
||||
Reference in New Issue
Block a user