eventlog: always use AuditSource objects as source field

This commit is contained in:
Girish Ramakrishnan
2023-08-26 08:18:58 +05:30
parent 246c45c1bc
commit d2c702f890
9 changed files with 34 additions and 19 deletions

View File

@@ -6,6 +6,7 @@ exports = module.exports = {
};
const assert = require('assert'),
AuditSource = require('./auditsource.js'),
constants = require('./constants.js'),
debug = require('debug')('box:server'),
eventlog = require('./eventlog.js'),
@@ -463,7 +464,7 @@ async function start() {
gHttpServer = await initializeExpressSync();
await util.promisify(gHttpServer.listen.bind(gHttpServer))(constants.PORT, '127.0.0.1');
await safe(eventlog.add(eventlog.ACTION_START, { userId: null, username: 'boot' }, { version: constants.VERSION })); // can fail if db down
await safe(eventlog.add(eventlog.ACTION_START, AuditSource.BOOT, { version: constants.VERSION })); // can fail if db down
}
async function stop() {