@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 +1 -1
- package/src/ServiceWrapper.js +3 -2
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -212,12 +212,13 @@ class ServiceWrapper {
|
|
|
212
212
|
async _initializeMonitoring() {
|
|
213
213
|
const serviceName = this.config.service?.name || 'unnamed-service';
|
|
214
214
|
|
|
215
|
-
|
|
216
|
-
|
|
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');
|