chore: add trace log

This commit is contained in:
chenos 2024-11-29 12:20:31 +08:00
parent 9ca80c483a
commit 04e7627935

View File

@ -181,6 +181,7 @@ export abstract class Plugin<O = any> implements PluginInterface {
private async getPluginBasePath() { private async getPluginBasePath() {
if (!this.options.packageName) { if (!this.options.packageName) {
this.app.log.trace(`plugin '${this.name}' is missing packageName`);
return; return;
} }
return getPluginBasePath(this.options.packageName); return getPluginBasePath(this.options.packageName);
@ -196,6 +197,7 @@ export abstract class Plugin<O = any> implements PluginInterface {
} }
const directory = resolve(basePath, 'server/collections'); const directory = resolve(basePath, 'server/collections');
if (await fsExists(directory)) { if (await fsExists(directory)) {
this.app.log.trace(`load plugin collections [${this.name}]`);
await this.db.import({ await this.db.import({
directory, directory,
from: this.options.packageName, from: this.options.packageName,