@punks/backend-entity-manager 0.0.225 → 0.0.226

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -2168,6 +2168,7 @@ class EntityEventsManager {
2168
2168
  constructor(entityName, services) {
2169
2169
  this.entityName = entityName;
2170
2170
  this.services = services;
2171
+ this.logger = backendCore.Log.getLogger("EntityEventsManager");
2171
2172
  }
2172
2173
  async processEntityCreatedEvent(entity) {
2173
2174
  this.services.resolveReplicaSyncManager().syncReplicas(entity);
@@ -2195,7 +2196,11 @@ class EntityEventsManager {
2195
2196
  if (!eventEmitter) {
2196
2197
  return;
2197
2198
  }
2198
- await eventEmitter.emit(`${this.entityName}.${event}`, payload);
2199
+ this.logger.debug(`Event emitted: ${this.buildEventName(event)}`, payload);
2200
+ await eventEmitter.emit(this.buildEventName(event), payload);
2201
+ }
2202
+ buildEventName(event) {
2203
+ return `${this.entityName}.${event}`;
2199
2204
  }
2200
2205
  }
2201
2206