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,12 +1,12 @@
|
||||
import assert from 'node:assert';
|
||||
import crypto from 'node:crypto';
|
||||
import database from './database.js';
|
||||
import debugModule from 'debug';
|
||||
import logger from './logger.js';
|
||||
import mysql from 'mysql2';
|
||||
import notifications from './notifications.js';
|
||||
import safe from 'safetydance';
|
||||
|
||||
const debug = debugModule('box:eventlog');
|
||||
const { log, trace } = logger('eventlog');
|
||||
|
||||
const ACTION_ACTIVATE = 'cloudron.activate';
|
||||
const ACTION_USER_LOGIN = 'user.login';
|
||||
@@ -119,7 +119,7 @@ async function cleanup(options) {
|
||||
assert.strictEqual(typeof options, 'object');
|
||||
|
||||
const creationTime = options.creationTime;
|
||||
debug(`cleanup: pruning events. creationTime: ${creationTime.toString()}`);
|
||||
log(`cleanup: pruning events. creationTime: ${creationTime.toString()}`);
|
||||
|
||||
// only these actions are pruned
|
||||
const actions = [
|
||||
|
||||
Reference in New Issue
Block a user