@onlineapps/service-wrapper 2.1.3 → 2.1.7
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 -18
- package/src/index.js +4 -1
package/package.json
CHANGED
package/src/ServiceWrapper.js
CHANGED
|
@@ -558,24 +558,9 @@ class ServiceWrapper {
|
|
|
558
558
|
// Logger is now available, use it
|
|
559
559
|
this.logger.info('Monitoring connector initialized', { logsDir });
|
|
560
560
|
|
|
561
|
-
//
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
const start = Date.now();
|
|
565
|
-
|
|
566
|
-
res.on('finish', () => {
|
|
567
|
-
const duration = Date.now() - start;
|
|
568
|
-
this.monitoring?.info && this.monitoring.info('Request processed', {
|
|
569
|
-
method: req.method,
|
|
570
|
-
path: req.path,
|
|
571
|
-
statusCode: res.statusCode,
|
|
572
|
-
duration
|
|
573
|
-
});
|
|
574
|
-
});
|
|
575
|
-
|
|
576
|
-
next();
|
|
577
|
-
});
|
|
578
|
-
}
|
|
561
|
+
// NOTE: HTTP logging middleware is applied directly in service's app.js
|
|
562
|
+
// using middlewares/httpLogging.js with lazy logger access via lib/logger.js
|
|
563
|
+
// Configuration is in conn-config/config.json -> wrapper.logging (for reference)
|
|
579
564
|
}
|
|
580
565
|
|
|
581
566
|
/**
|
package/src/index.js
CHANGED
|
@@ -18,8 +18,11 @@ const { ConfigLoader } = require('./ConfigLoader');
|
|
|
18
18
|
// - WorkflowProcessor -> @onlineapps/conn-orch-orchestrator
|
|
19
19
|
// - ApiCaller -> @onlineapps/conn-orch-api-mapper
|
|
20
20
|
|
|
21
|
+
// Note: HTTP logging middleware is now in each service's middlewares/httpLogging.js
|
|
22
|
+
// It uses lazy logger access via lib/logger.js (set after wrapper.initialize())
|
|
23
|
+
|
|
21
24
|
module.exports = ServiceWrapper;
|
|
22
25
|
module.exports.ServiceWrapper = ServiceWrapper;
|
|
23
26
|
module.exports.ConfigLoader = ConfigLoader;
|
|
24
27
|
module.exports.default = ServiceWrapper;
|
|
25
|
-
module.exports.VERSION = '2.1.
|
|
28
|
+
module.exports.VERSION = '2.1.6';
|