@onlineapps/infrastructure-tools 1.0.1 → 1.0.2

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/infrastructure-tools",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Infrastructure orchestration utilities for OA Drive infrastructure services (health tracking, queue initialization, service discovery)",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -43,11 +43,17 @@ async function waitForInfrastructureReady(options = {}) {
43
43
  const logger = options.logger || console;
44
44
 
45
45
  // Universal logger adapter (supports both console and winston)
46
+ // Winston logger expects object with message property, console.log accepts string
46
47
  const log = (message) => {
47
- if (typeof logger.info === 'function') {
48
- logger.info(message);
48
+ if (typeof logger.info === 'function' && typeof logger.log !== 'function') {
49
+ // Likely winston logger - use object format
50
+ logger.info({ message: String(message) });
49
51
  } else if (typeof logger.log === 'function') {
52
+ // console.log or similar
50
53
  logger.log(message);
54
+ } else if (typeof logger.info === 'function') {
55
+ // Fallback for other loggers
56
+ logger.info(message);
51
57
  } else {
52
58
  console.log(message);
53
59
  }