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:
@@ -1,7 +1,7 @@
|
||||
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 oidcClients from './oidcclients.js';
|
||||
import oidcServer from './oidcserver.js';
|
||||
@@ -9,7 +9,7 @@ import settings from './settings.js';
|
||||
import tokens from './tokens.js';
|
||||
import users from './users.js';
|
||||
|
||||
const debug = debugModule('box:user-directory');
|
||||
const { log, trace } = logger('user-directory');
|
||||
|
||||
|
||||
async function getProfileConfig() {
|
||||
@@ -30,7 +30,7 @@ async function setProfileConfig(profileConfig, options, auditSource) {
|
||||
await eventlog.add(eventlog.ACTION_USER_DIRECTORY_PROFILE_CONFIG_UPDATE, auditSource, { oldConfig, config: profileConfig });
|
||||
|
||||
if (profileConfig.mandatory2FA && !oldConfig.mandatory2FA) {
|
||||
debug('setProfileConfig: logging out non-2FA users to enforce 2FA');
|
||||
log('setProfileConfig: logging out non-2FA users to enforce 2FA');
|
||||
|
||||
const allUsers = await users.list();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user