@punks/backend-entity-manager 0.0.339 → 0.0.340

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.
@@ -3,6 +3,7 @@ import { IResolveServiceOptions, IServiceLocator } from "../abstractions/ioc";
3
3
  export declare class ServiceLocator implements IServiceLocator {
4
4
  private services;
5
5
  private multipleServices;
6
+ private logger;
6
7
  all(): {
7
8
  [key: string]: any;
8
9
  };
package/dist/esm/index.js CHANGED
@@ -1172,6 +1172,7 @@ class ServiceLocator {
1172
1172
  constructor() {
1173
1173
  this.services = {};
1174
1174
  this.multipleServices = {};
1175
+ this.logger = Log.getLogger("ServiceLocator");
1175
1176
  }
1176
1177
  all() {
1177
1178
  return this.services;
@@ -1184,7 +1185,7 @@ class ServiceLocator {
1184
1185
  this.multipleServices[serviceName] = {};
1185
1186
  }
1186
1187
  if (this.multipleServices[serviceName][instanceName]) {
1187
- throw new Error(`Service instance "${serviceName}" "${instanceName}" already registered in ServiceLocator`);
1188
+ this.logger.warn(`Service instance "${serviceName}" "${instanceName}" already registered in ServiceLocator`);
1188
1189
  }
1189
1190
  this.multipleServices[serviceName][instanceName] = service;
1190
1191
  }