mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:25:15 +00:00
chore: database debug logging
This commit is contained in:
parent
16458ab538
commit
e3408c9ff1
@ -320,7 +320,11 @@ export class Collection<
|
||||
|
||||
const { database } = this.context;
|
||||
|
||||
database.logger.debug(`beforeSetField: ${this.name}, ${name}, ${safeJsonStringify(options)}`);
|
||||
database.logger.debug(`beforeSetField: ${safeJsonStringify(options)}`, {
|
||||
databaseInstanceId: database.instanceId,
|
||||
collectionName: this.name,
|
||||
fieldName: name,
|
||||
});
|
||||
|
||||
if (options.source) {
|
||||
const [sourceCollectionName, sourceFieldName] = options.source.split('.');
|
||||
|
@ -261,6 +261,9 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
||||
}
|
||||
|
||||
this.options = opts;
|
||||
this.logger.debug(`create database instance: ${safeJsonStringify(this.options)}`, {
|
||||
databaseInstanceId: this.instanceId,
|
||||
});
|
||||
|
||||
const sequelizeOptions = this.sequelizeOptions(this.options);
|
||||
this.sequelize = new Sequelize(sequelizeOptions);
|
||||
@ -538,7 +541,9 @@ export class Database extends EventEmitter implements AsyncEmitter {
|
||||
options.underscored = true;
|
||||
}
|
||||
|
||||
this.logger.debug(`beforeDefineCollection: ${safeJsonStringify(options)}`);
|
||||
this.logger.debug(`beforeDefineCollection: ${safeJsonStringify(options)}`, {
|
||||
databaseInstanceId: this.instanceId,
|
||||
});
|
||||
|
||||
this.emit('beforeDefineCollection', options);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user