@onlineapps/service-wrapper 2.0.31 → 2.0.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/service-wrapper",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -212,12 +212,13 @@ class ServiceWrapper {
212
212
  async _initializeMonitoring() {
213
213
  const serviceName = this.config.service?.name || 'unnamed-service';
214
214
 
215
- this.monitoring = MonitoringConnector;
216
- await this.monitoring.init({
215
+ // Init returns API object with logger, info, error, warn, debug methods
216
+ this.monitoring = await MonitoringConnector.init({
217
217
  serviceName,
218
218
  ...this.config.wrapper?.monitoring
219
219
  });
220
220
 
221
+ // Logger is the API object returned from init (has logger, info, error, warn, debug)
221
222
  this.logger = this.monitoring;
222
223
  // Logger is now available, use it
223
224
  this.logger.info('Monitoring connector initialized');