@infineit/winston-logger 1.0.38 → 1.0.40

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/README.md CHANGED
@@ -45,11 +45,12 @@ npm install @infineit/winston-logger
45
45
 
46
46
  This package requires the following peer dependencies (usually already installed in NestJS projects):
47
47
 
48
- - `@nestjs/common` 11.1.9
49
- - `@nestjs/config` 4.2.0
50
- - `@nestjs/core` 11.1.9
51
- - `nestjs-cls` 5.0.1
52
- - `uuid` (required for correlation ID generation in HTTP contexts)
48
+ - `@nestjs/common` ^11.1.11
49
+ - `@nestjs/config` ^4.0.2
50
+ - `@nestjs/core` ^11.1.11
51
+ - `nestjs-cls` ^6.2.0 (required for CLS context management - correlation IDs)
52
+
53
+ **Note:** The `uuid` package is **NOT** required by this library. If you need correlation ID generation in your application code (e.g., in middleware), you can install `uuid` separately. The library itself does not generate correlation IDs - it only reads them from CLS context.
53
54
 
54
55
  ### ⚠️ Critical Setup Requirement
55
56
 
@@ -251,9 +252,9 @@ You can also configure via `@nestjs/config`:
251
252
  ```typescript
252
253
  // .env
253
254
  NODE_ENV=production
254
- SLACK_WEBHOOK=https://hooks.slack.com/services/...
255
- CONSOLE_PRINT=true
256
- LOG_IN_FILE=true
255
+ LOGGER_SLACK_INC_WEBHOOK_URL=https://hooks.slack.com/services/...
256
+ LOGGER_CONSOLE_PRINT=true
257
+ LOGGER_LOG_IN_FILE=true
257
258
  LOGGER_ORGANIZATION=my-org
258
259
  LOGGER_CONTEXT=user-service
259
260
  LOGGER_APP=api-gateway
@@ -271,19 +272,24 @@ LOGGER_HTTP_ENDPOINT=https://logging-service.example.com/api/logs
271
272
  // logger.config.ts
272
273
  import { registerAs } from '@nestjs/config';
273
274
 
275
+ const getBooleanEnvVar = (key: string, defaultValue: boolean = false): boolean => {
276
+ const value = process.env[key];
277
+ return value ? value.toLowerCase() === 'true' : defaultValue;
278
+ };
279
+
274
280
  export default registerAs('logger', () => ({
275
- nodeEnv: process.env.NODE_ENV,
276
- slack_webhook: process.env.SLACK_WEBHOOK,
277
- console_print: process.env.CONSOLE_PRINT,
278
- log_in_file: process.env.LOG_IN_FILE,
279
- organization: process.env.LOGGER_ORGANIZATION,
280
- context: process.env.LOGGER_CONTEXT,
281
- app: process.env.LOGGER_APP,
281
+ nodeEnv: process.env.NODE_ENV || 'development',
282
+ slack_webhook: process.env.LOGGER_SLACK_INC_WEBHOOK_URL || undefined,
283
+ console_print: getBooleanEnvVar('LOGGER_CONSOLE_PRINT', false),
284
+ log_in_file: getBooleanEnvVar('LOGGER_LOG_IN_FILE', false),
285
+ organization: process.env.LOGGER_ORGANIZATION || undefined,
286
+ context: process.env.LOGGER_CONTEXT || undefined,
287
+ app: process.env.LOGGER_APP || undefined,
282
288
  // Optional: Central log forwarding
283
- forwardToCentral: process.env.LOGGER_FORWARD_TO_CENTRAL,
284
- transportType: process.env.LOGGER_TRANSPORT_TYPE,
285
- httpEndpoint: process.env.LOGGER_HTTP_ENDPOINT,
286
- kafkaTopic: process.env.LOGGER_KAFKA_TOPIC,
289
+ forwardToCentral: process.env.LOGGER_FORWARD_TO_CENTRAL === 'true' || process.env.LOGGER_FORWARD_TO_CENTRAL === true,
290
+ transportType: process.env.LOGGER_TRANSPORT_TYPE as 'http' | 'kafka' | undefined,
291
+ httpEndpoint: process.env.LOGGER_HTTP_ENDPOINT || undefined,
292
+ kafkaTopic: process.env.LOGGER_KAFKA_TOPIC || undefined,
287
293
  }));
288
294
  ```
289
295
 
@@ -312,17 +318,29 @@ export class AppModule {}
312
318
  | `organization` | `string` | No | `undefined` | Organization or project name |
313
319
  | `context` | `string` | No | `undefined` | Bounded context name |
314
320
  | `app` | `string` | No | `undefined` | Application or microservice name |
315
- | `forwardToCentral` | `boolean \| string` | No | `false` | Enable forwarding to centralized logging service (`true`/`false` or `'true'`/`'false'`) |
316
- | `transportType` | `'kafka' \| 'http'` | No | `undefined` | Transport type for central forwarding (required if `forwardToCentral=true`) |
317
- | `httpEndpoint` | `string` | No | `undefined` | HTTP endpoint for central forwarding (required if `transportType='http'`) |
318
- | `kafkaTopic` | `string` | No | `undefined` | Kafka topic for central forwarding (required if `transportType='kafka'`) |
321
+ | `forwardToCentral` | `boolean \| string` | No | `false` | Enable forwarding to centralized logging service. Accepts: `true`, `false`, `'true'`, `'false'`, or `undefined`. Only `true` or `'true'` enables forwarding. |
322
+ | `transportType` | `'kafka' \| 'http'` | No | `undefined` | Transport type for central forwarding. **Required** if `forwardToCentral=true`. Invalid config returns `null` (logged to console.error, no exception thrown). |
323
+ | `httpEndpoint` | `string` | No | `undefined` | HTTP endpoint for central forwarding. **Required** if `transportType='http'`. Invalid config returns `null`. HTTP requests have 5-second timeout. |
324
+ | `kafkaTopic` | `string` | No | `undefined` | Kafka topic for central forwarding. **Required** if `transportType='kafka'`. Invalid config returns `null`. Requires `KafkaProducerKey` provider. |
319
325
 
320
326
  ### Default Behavior
321
327
 
322
- - **Development/Testing**: Console and file logging enabled by default
323
- - **Production**: Console and file logging disabled by default (unless explicitly enabled)
324
- - **Slack**: Only enabled in production/testing when `slack_webhook` is provided
325
- - **Central Forwarding**: Disabled by default (set `forwardToCentral=true` to enable)
328
+ **Console and File Logging:**
329
+ - **Development environments** (`NODE_ENV='development'` or `undefined`): Console and file logging are **automatically enabled** regardless of `console_print`/`log_in_file` settings (code: `(!isProduction && !isTesting) || consolePrint`)
330
+ - **Production or testing environments** (`NODE_ENV='production'` or `'testing'`): Console and file logging are **disabled by default** and must be explicitly enabled via `LOGGER_CONSOLE_PRINT=true` or `LOGGER_LOG_IN_FILE=true`
331
+
332
+ **Slack:**
333
+ - Only enabled in **production or testing** when `slack_webhook` is provided
334
+ - Disabled in development environments
335
+
336
+ **Central Forwarding:**
337
+ - **Disabled by default** (set `forwardToCentral=true` to enable)
338
+ - Requires `transportType` ('http' or 'kafka') and corresponding endpoint/topic
339
+
340
+ **Configuration Merge Precedence:**
341
+ - `LoggerModule.forRoot(config)` parameter takes precedence over `ConfigService` values
342
+ - If both are provided, parameter values override ConfigService values
343
+ - If forwarding is disabled (false/undefined), `CentralLogForwarder` returns `null` (no errors thrown)
326
344
 
327
345
  ### Environment-Specific Configuration Tips
328
346
 
@@ -330,10 +348,10 @@ export class AppModule {}
330
348
  ```bash
331
349
  # Disable forwarding in development (optional)
332
350
  LOGGER_FORWARD_TO_CENTRAL=false
333
- # OR use local endpoint for testing
351
+ # OR use local endpoint for testing (separate service/port required)
334
352
  LOGGER_FORWARD_TO_CENTRAL=true
335
353
  LOGGER_TRANSPORT_TYPE=http
336
- LOGGER_HTTP_ENDPOINT=http://localhost:3000/api/logs
354
+ LOGGER_HTTP_ENDPOINT=http://127.0.0.1:3062/api/logs # Different port/service
337
355
  ```
338
356
 
339
357
  **Production:**
@@ -341,7 +359,7 @@ LOGGER_HTTP_ENDPOINT=http://localhost:3000/api/logs
341
359
  # Enable forwarding in production
342
360
  LOGGER_FORWARD_TO_CENTRAL=true
343
361
  LOGGER_TRANSPORT_TYPE=http
344
- LOGGER_HTTP_ENDPOINT=https://central-logging.example.com/api/logs
362
+ LOGGER_HTTP_ENDPOINT=https://central-logging.example.com/api/logs # Separate service
345
363
  # OR use Kafka for better performance
346
364
  # LOGGER_TRANSPORT_TYPE=kafka
347
365
  # LOGGER_KAFKA_TOPIC=project-logs-<project-name>
@@ -796,18 +814,18 @@ Central log forwarding is completely fire-and-forget:
796
814
  # Option 1: Disable forwarding in development
797
815
  LOGGER_FORWARD_TO_CENTRAL=false
798
816
 
799
- # Option 2: Use local endpoint for testing
817
+ # Option 2: Use local endpoint for testing (separate service/port required)
800
818
  LOGGER_FORWARD_TO_CENTRAL=true
801
819
  LOGGER_TRANSPORT_TYPE=http
802
- LOGGER_HTTP_ENDPOINT=http://localhost:3000/api/logs
820
+ LOGGER_HTTP_ENDPOINT=http://127.0.0.1:3062/api/logs # Different port/service
803
821
  ```
804
822
 
805
823
  **Production:**
806
824
  ```bash
807
- # HTTP forwarding (simpler setup)
825
+ # HTTP forwarding (simpler setup, separate service required)
808
826
  LOGGER_FORWARD_TO_CENTRAL=true
809
827
  LOGGER_TRANSPORT_TYPE=http
810
- LOGGER_HTTP_ENDPOINT=https://central-logging.example.com/api/logs
828
+ LOGGER_HTTP_ENDPOINT=https://central-logging.example.com/api/logs # Separate service
811
829
 
812
830
  # OR Kafka forwarding (better performance, requires Kafka producer)
813
831
  LOGGER_FORWARD_TO_CENTRAL=true
@@ -831,11 +849,16 @@ LOGGER_KAFKA_TOPIC=project-logs-common
831
849
  ### Troubleshooting
832
850
 
833
851
  **Forwarding Not Working:**
834
- 1. Check configuration: `LOGGER_FORWARD_TO_CENTRAL` must be `'true'` or `true`
835
- 2. Verify transport type: Must be `'http'` or `'kafka'`
836
- 3. Check endpoint/topic: Must be configured correctly
837
- 4. For Kafka: Ensure `KafkaProducerKey` is provided in module providers
838
- 5. Check console errors: Forwarding errors are logged to `console.error` with message `"CentralLogForwarder forward error (swallowed): <error>"`
852
+ 1. Check configuration: `LOGGER_FORWARD_TO_CENTRAL` must be `'true'` or `true` (not `'false'`, `false`, or `undefined`)
853
+ 2. Verify transport type: Must be exactly `'http'` or `'kafka'` (case-sensitive)
854
+ 3. Check endpoint/topic: Must be configured correctly (HTTP endpoint must be valid URL, Kafka topic must be non-empty string)
855
+ 4. For Kafka: Ensure `KafkaProducerKey` is provided in module providers (otherwise forwarding is silently skipped)
856
+ 5. Check console errors: Forwarding errors are logged to `console.error` with messages:
857
+ - `"CentralLogForwarder: Invalid configuration - transportType and endpoint/topic required"` (factory returns `null` for invalid config)
858
+ - `"[HttpCentralLogForwarder] Forward error (swallowed): <error>"` (HTTP forwarding errors during forward())
859
+ - `"HttpCentralLogForwarder error (swallowed): <error>"` (HTTP request errors)
860
+ - `"KafkaCentralLogForwarder forward error (swallowed): <error>"` (Kafka forwarding errors)
861
+ - `"KafkaCentralLogForwarder send error (swallowed): <error>"` (Kafka producer send() errors)
839
862
 
840
863
  **Correlation ID Missing:**
841
864
  - Ensure `ContextModule` is imported: `ContextModule` automatically configures `ClsModule` with `generateId: true`
@@ -843,10 +866,11 @@ LOGGER_KAFKA_TOPIC=project-logs-common
843
866
  - Check that original logs have `correlationId` field (if not, forwarded logs won't either)
844
867
 
845
868
  **HTTP Forwarding Timeout:**
846
- - HTTP forwarding has a 5-second timeout
847
- - Timeouts are swallowed (no errors thrown)
848
- - Consider using Kafka instead if central service is slow
849
- - Or improve central service performance
869
+ - HTTP forwarding has a **5-second timeout** (code: `req.setTimeout(5000)`)
870
+ - Timeouts are swallowed (no errors thrown, request destroyed silently)
871
+ - If timeout occurs, request is destroyed (`req.destroy()`) and error is logged to `console.error`
872
+ - Consider using Kafka instead if central service is slow or unreliable
873
+ - Or improve central service performance/availability
850
874
 
851
875
  **Note:** Forwarding failures do not affect your application. Original logging continues normally, and business logic is never impacted.
852
876
 
@@ -2272,6 +2296,122 @@ export class AppModule {}
2272
2296
 
2273
2297
  ---
2274
2298
 
2299
+ ---
2300
+
2301
+ ## Configuration Truth Table
2302
+
2303
+ ### Environment Variable → Behavior Mapping
2304
+
2305
+ | Environment Variable | Value | Behavior |
2306
+ |---------------------|-------|----------|
2307
+ | `NODE_ENV` | `'production'` or `'testing'` | Console/file logging **disabled by default** (must explicitly set `LOGGER_CONSOLE_PRINT=true` or `LOGGER_LOG_IN_FILE=true`); Slack enabled if webhook provided |
2308
+ | `NODE_ENV` | `'development'` or `undefined` | Console/file logging **enabled automatically** (code: `(!isProduction && !isTesting) || consolePrint`); `console_print`/`log_in_file` settings ignored |
2309
+ | `LOGGER_CONSOLE_PRINT` | `true` or `'true'` | Console logging enabled (overrides environment default) |
2310
+ | `LOGGER_CONSOLE_PRINT` | `false`, `'false'`, or `undefined` | Console logging follows environment default (disabled in prod/testing, enabled in development) |
2311
+ | `LOGGER_LOG_IN_FILE` | `true` or `'true'` | File logging enabled (overrides environment default) |
2312
+ | `LOGGER_LOG_IN_FILE` | `false`, `'false'`, or `undefined` | File logging follows environment default (disabled in prod/testing, enabled in development) |
2313
+ | `LOGGER_FORWARD_TO_CENTRAL` | `true` or `'true'` | Central forwarding **enabled** (requires `transportType` and endpoint/topic) |
2314
+ | `LOGGER_FORWARD_TO_CENTRAL` | `false`, `'false'`, `undefined`, or not set | Central forwarding **disabled** (returns `null`, no errors) |
2315
+ | `LOGGER_TRANSPORT_TYPE` | `'http'` | HTTP forwarding enabled (requires `LOGGER_HTTP_ENDPOINT`) |
2316
+ | `LOGGER_TRANSPORT_TYPE` | `'kafka'` | Kafka forwarding enabled (requires `LOGGER_KAFKA_TOPIC` and `KafkaProducerKey` provider) |
2317
+ | `LOGGER_TRANSPORT_TYPE` | Invalid or `undefined` | Forwarding disabled (returns `null`, logs error to console.error) |
2318
+ | `LOGGER_HTTP_ENDPOINT` | Valid URL | HTTP forwarding active (5-second timeout) |
2319
+ | `LOGGER_HTTP_ENDPOINT` | Invalid or `undefined` | Forwarding disabled if `transportType='http'` (returns `null`, logs error) |
2320
+ | `LOGGER_KAFKA_TOPIC` | Valid string | Kafka forwarding active (if `KafkaProducerKey` provided) |
2321
+ | `LOGGER_KAFKA_TOPIC` | `undefined` | Forwarding disabled if `transportType='kafka'` (returns `null`, logs error) |
2322
+
2323
+ ### Configuration Precedence Rules
2324
+
2325
+ 1. **`LoggerModule.forRoot(config)` parameter** takes precedence over `ConfigService` values
2326
+ 2. If `forwardToCentral` is `false`, `undefined`, or invalid → `CentralLogForwarder` returns `null` (no exceptions)
2327
+ 3. If `transportType` or endpoint/topic is invalid → `CentralLogForwarder` returns `null` (logs error, no exceptions)
2328
+ 4. Invalid configuration does **not** throw errors - failures are swallowed to preserve fire-and-forget behavior
2329
+
2330
+ ---
2331
+
2332
+ ## Code Audit Summary
2333
+
2334
+ ### Verified Behavior (as implemented)
2335
+
2336
+ **Configuration Reading:**
2337
+ - Configuration can be provided via `LoggerModule.forRoot(config)` parameter OR `ConfigService`
2338
+ - Parameter config takes precedence over `ConfigService` when both are provided
2339
+ - Factory merges both sources: `loggerConfig.forwardToCentral ?? configFromService?.forwardToCentral`
2340
+ - Invalid configuration returns `null` (does not throw exceptions)
2341
+
2342
+ **Environment-Based Defaults:**
2343
+ - **Non-production/non-testing**: Console and file transports automatically enabled (code: `(!isProduction && !isTesting) || consolePrint`)
2344
+ - **Production/testing**: Console and file transports disabled unless explicitly enabled via `console_print`/`log_in_file`
2345
+ - Slack transport only enabled in production/testing when `slack_webhook` is provided
2346
+
2347
+ **Central Forwarding:**
2348
+ - `forwardToCentral` must be exactly `true` or `'true'` to enable (string comparison: `=== 'true'`)
2349
+ - HTTP forwarding uses Node.js built-in `http`/`https` modules (no external dependencies)
2350
+ - HTTP requests have 5-second timeout (code: `req.setTimeout(5000)`)
2351
+ - Kafka forwarding requires `KafkaProducerKey` provider (optional injection, returns `null` if not provided)
2352
+ - Forwarding failures are swallowed (logged to `console.error`, never throw)
2353
+
2354
+ **Fire-and-Forget Guarantee:**
2355
+ - All logging methods return `void` (non-blocking)
2356
+ - All transport errors are caught and swallowed (never propagate)
2357
+ - Central forwarding errors are caught at multiple levels (forwarder, service, transport)
2358
+ - No async/await in logging code (all synchronous fire-and-forget)
2359
+
2360
+ **Dependency Injection:**
2361
+ - `LoggerService` is provided both via `LoggerKey` (Symbol) and class token
2362
+ - Direct class injection works: `constructor(private readonly logger: LoggerService)`
2363
+ - `CentralLogForwarder` is optional injection (`@Optional()`) - returns `null` if not configured
2364
+ - `KafkaProducerKey` is optional injection in factory - returns `null` if not provided
2365
+
2366
+ **CLS Integration:**
2367
+ - `ContextModule` uses `nestjs-cls@6.2.0` (not 5.0.1) with `mount: true` and `generateId: true`
2368
+ - Correlation ID is optional (`undefined` is valid)
2369
+ - Correlation ID is included in HTTP header (`x-correlation-id`) when forwarding
2370
+ - Correlation ID is included in Kafka message key and headers when forwarding
2371
+
2372
+ ### Unused / Removable Dependencies (Safe to Remove)
2373
+
2374
+ **Root `package.json` (`/package.json`):**
2375
+ - `uuid` (version 13.0.0) - **NOT used in library code** (`libs/src/`). Only appears in README examples. **Safe to remove** if application code (`apps/`) doesn't use it for correlation ID generation.
2376
+
2377
+ **Note:** The library does **not** generate correlation IDs. Applications must either:
2378
+ - Rely on `ContextModule`'s automatic generation (HTTP contexts via `ClsModule` with `generateId: true`)
2379
+ - Generate IDs manually in application code (e.g., middleware, Kafka consumers)
2380
+ - Pass correlation IDs from external sources (HTTP headers, Kafka message headers)
2381
+
2382
+ **Library `package.json` (`libs/package.json`):**
2383
+ - ✅ **REMOVED**: `@types/uuid` (version ^9.0.6) - **NOT used** in library code. Removed from devDependencies.
2384
+ - All other dependencies are **verified as used**:
2385
+ - `@nestjs/common`, `@nestjs/config`, `@nestjs/core` - Core NestJS dependencies
2386
+ - `nestjs-cls@6.2.0` - Used in `ContextModule` and `NestjsClsContextStorageService`
2387
+ - `winston`, `winston-daily-rotate-file`, `winston-slack-webhook-transport` - Used in Winston transports
2388
+ - `reflect-metadata`, `rxjs` - Required by NestJS
2389
+
2390
+ **Dead Code (Not Removed - Exported for Manual Use):**
2391
+ - `CentralLogForwarder` class exists but is **not used by `LoggerModule`**. The module factory creates `HttpCentralLogForwarder` or `KafkaCentralLogForwarder` directly. However, the class is exported in `index.ts` for potential manual use, so it's kept for backward compatibility.
2392
+
2393
+ ### Environment Variable Name Corrections
2394
+
2395
+ **Actual environment variable names (as implemented in `apps/src/config/logger.config.ts`):**
2396
+ - ✅ `LOGGER_SLACK_INC_WEBHOOK_URL` (not `SLACK_WEBHOOK`)
2397
+ - ✅ `LOGGER_CONSOLE_PRINT` (not `CONSOLE_PRINT`)
2398
+ - ✅ `LOGGER_LOG_IN_FILE` (not `LOG_IN_FILE`)
2399
+ - ✅ `LOGGER_ORGANIZATION`, `LOGGER_CONTEXT`, `LOGGER_APP` (correct)
2400
+ - ✅ `LOGGER_FORWARD_TO_CENTRAL`, `LOGGER_TRANSPORT_TYPE`, `LOGGER_HTTP_ENDPOINT`, `LOGGER_KAFKA_TOPIC` (correct)
2401
+
2402
+ ### Fail-Fast Behavior
2403
+
2404
+ **Important:** The library does **NOT** fail-fast for invalid configuration:
2405
+ - Invalid `forwardToCentral` → Returns `null`, no error thrown
2406
+ - Invalid `transportType` → Returns `null`, logs to `console.error`, no exception
2407
+ - Missing `httpEndpoint` or `kafkaTopic` → Returns `null`, logs to `console.error`, no exception
2408
+ - Invalid HTTP endpoint URL → Constructor throws (expected - invalid URL is a programming error)
2409
+ - Missing `KafkaProducerKey` → Kafka forwarding silently skipped (returns `null`, no error)
2410
+
2411
+ **Rationale:** Fail-fast behavior would violate the fire-and-forget guarantee. Invalid configuration should not crash the application - it should gracefully degrade (disable forwarding) and log the issue.
2412
+
2413
+ ---
2414
+
2275
2415
  ## License
2276
2416
 
2277
2417
  MIT
@@ -80,7 +80,7 @@ class HttpCentralLogForwarder {
80
80
  req.end();
81
81
  }
82
82
  catch (error) {
83
- console.error('HttpCentralLogForwarder forward error (swallowed):', error);
83
+ console.error('[HttpCentralLogForwarder] Forward error (swallowed):', error);
84
84
  }
85
85
  }
86
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"httpCentralLogForwarder.js","sourceRoot":"","sources":["../../../../../libs/src/logger/infrastructure/forwarding/httpCentralLogForwarder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6CAA+B;AAC/B,6BAA0B;AAW1B,MAAa,uBAAuB;IACf,QAAQ,CAAS;IACjB,GAAG,CAAM;IAE1B,YAAY,QAAgB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC;YACD,IAAI,CAAC,GAAG,GAAG,IAAI,SAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YAEL,MAAM,IAAI,KAAK,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;IAMM,OAAO,CAAC,aAA4B;QACvC,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,a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AAC,CAAC,CAAC;YAEH,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACtB,GAAG,CAAC,GAAG,EAAE,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAEb,OAAO,CAAC,KAAK,CAAC,oDAAoD,EAAE,KAAK,CAAC,CAAC;QAC/E,CAAC;IACL,CAAC;CACJ;AA9DD,0DA8DC"}
1
+ {"version":3,"file":"httpCentralLogForwarder.js","sourceRoot":"","sources":["../../../../../libs/src/logger/infrastructure/forwarding/httpCentralLogForwarder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6CAA+B;AAC/B,6BAA0B;AAW1B,MAAa,uBAAuB;IACf,QAAQ,CAAS;IACjB,GAAG,CAAM;IAE1B,YAAY,QAAgB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC;YACD,IAAI,CAAC,GAAG,GAAG,IAAI,SAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YAEL,MAAM,IAAI,KAAK,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;IAMM,OAAO,CAAC,aAA4B;QACvC,IAAI,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YACjD,MAAM,OAAO,GAAG;gBACZ,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ;gBAC3B,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ;gBACvB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACL,cAAc,EAAE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fig.forwardToCentral;
79
- const forwardToCentral = forwardToCentralConfig !== undefined
80
- ? forwardToCentralConfig === 'true' || forwardToCentralConfig === true
81
- : false;
82
78
  const providers = [
83
79
  ...transportProviders,
84
- ...(forwardToCentral && loggerConfig.transportType
85
- ? [
80
+ {
81
+ provide: centralLogForwarder_1.CentralLogForwarderKey,
82
+ useFactory: (configService, kafkaProducer) => {
83
+ const configFromService = configService.get('logger');
84
+ const mergedConfig = {
85
+ forwardToCentral: loggerConfig.forwardToCentral ?? configFromService?.forwardToCentral,
86
+ transportType: loggerConfig.transportType ?? configFromService?.transportType,
87
+ httpEndpoint: loggerConfig.httpEndpoint ?? configFromService?.httpEndpoint,
88
+ kafkaTopic: loggerConfig.kafkaTopic ?? configFromService?.kafkaTopic,
89
+ };
90
+ const forwardToCentral = mergedConfig.forwardToCentral === true ||
91
+ mergedConfig.forwardToCentral === 'true' ||
92
+ false;
93
+ if (!forwardToCentral) {
94
+ return null;
95
+ }
96
+ if (mergedConfig.transportType === 'http' && mergedConfig.httpEndpoint) {
97
+ return new httpCentralLogForwarder_1.HttpCentralLogForwarder(mergedConfig.httpEndpoint);
98
+ }
99
+ else if (mergedConfig.transportType === 'kafka' && mergedConfig.kafkaTopic) {
100
+ return new kafkaCentralLogForwarder_1.KafkaCentralLogForwarder(mergedConfig.kafkaTopic, kafkaProducer);
101
+ }
102
+ console.error('CentralLogForwarder: Invalid configuration - transportType and endpoint/topic required');
103
+ return null;
104
+ },
105
+ inject: [
106
+ config_1.ConfigService,
86
107
  {
87
- provide: centralLogForwarder_1.CentralLogForwarderKey,
88
- useFactory: (configService, kafkaProducer) => {
89
- const configFromService = configService.get('logger');
90
- const finalConfig = {
91
- forwardToCentral: loggerConfig.forwardToCentral ??
92
- configFromService?.forwardToCentral ??
93
- true,
94
- transportType: loggerConfig.transportType ??
95
- configFromService?.transportType,
96
- httpEndpoint: loggerConfig.httpEndpoint ?? configFromService?.httpEndpoint,
97
- kafkaTopic: loggerConfig.kafkaTopic ?? configFromService?.kafkaTopic,
98
- };
99
- if (finalConfig.transportType === 'http' &&
100
- finalConfig.httpEndpoint) {
101
- return new httpCentralLogForwarder_1.HttpCentralLogForwarder(finalConfig.httpEndpoint);
102
- }
103
- else if (finalConfig.transportType === 'kafka' &&
104
- finalConfig.kafkaTopic) {
105
- return new kafkaCentralLogForwarder_1.KafkaCentralLogForwarder(finalConfig.kafkaTopic, kafkaProducer);
106
- }
107
- console.error('CentralLogForwarder: Invalid configuration - transportType and endpoint/topic required');
108
- return null;
109
- },
110
- inject: [
111
- config_1.ConfigService,
112
- {
113
- token: centralLogForwarder_1.KafkaProducerKey,
114
- optional: true,
115
- },
116
- ],
108
+ token: centralLogForwarder_1.KafkaProducerKey,
109
+ optional: true,
117
110
  },
118
- ]
119
- : []),
111
+ ],
112
+ },
120
113
  {
121
114
  provide: loggerTransport_1.LoggerTransportKey,
122
115
  useFactory: (...transports) => {
@@ -1 +1 @@
1
- {"version":3,"file":"loggerModule.js","sourceRoot":"","sources":["../../../../../libs/src/logger/infrastructure/nestjs/loggerModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAyE;AACzE,2CAA+C;AAI/C,0DAAkE;AAClE,yFAAiE;AACjE,4EAA6F;AAC7F,uGAIuE;AACvE,+GAA4G;AAC5G,iHAA8G;AAC9G,kIAA0G;AAC1G,0HAAkG;AAClG,oHAA4F;AAC5F,sHAA8F;AAC9F,4GAGwE;AAkBjE,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACrB,MAAM,CAAC,OAAO,CAAC,MAA2B,EAAE,oBAAiC;QAEzE,MAAM,kBAAkB,GAAe;YAEnC;gBACI,OAAO,EAAE,8DAAoC;gBAC7C,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;oBACzC,MAAM,UAAU,GAAwB,EAAE,CAAC;oBAG3C,MAAM,YAAY,GACd,MAAM;wBACL,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAoC;wBAC/D,EAAE,CAAC;oBASP,MAAM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,CAAC;IACN,CAAC;CACJ,CAAA;AArLY,oCAAY;uBAAZ,YAAY;IAFxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,YAAY,CAqLxB"}
1
+ {"version":3,"file":"loggerModule.js","sourceRoot":"","sources":["../../../../../libs/src/logger/infrastructure/nestjs/loggerModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAyE;AACzE,2CAA+C;AAI/C,0DAAkE;AAClE,yFAAiE;AACjE,4EAA6F;AAC7F,uGAIuE;AACvE,+GAA4G;AAC5G,iHAA8G;AAC9G,kIAA0G;AAC1G,0HAAkG;AAClG,oHAA4F;AAC5F,sHAA8F;AAC9F,4GAGwE;AAkBjE,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACrB,MAAM,CAAC,OAAO,CAAC,MAA2B,EAAE,oBAAiC;QAEzE,MAAM,kBAAkB,GAAe;YAEnC;gBACI,OAAO,EAAE,8DAAoC;gBAC7C,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;oBACzC,MAAM,UAAU,GAAwB,EAAE,CAAC;oBAG3C,MAAM,YAAY,GACd,MAAM;wBACL,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAoC;wBAC/D,EAAE,CAAC;oBASP,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,KAAK,YAAY,CAAC;oBAC3D,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,KAAK,SAAS,CAAC;oBACrD,MAAM,eAAe,GAAG,YAAY,CAAC,aAAa,CAAC;oBAEnD,MAAM,kBAAkB,GAAG,YAAY,CAAC,aAAa,CAAC;oBACtD,MAAM,YAAY,GACd,kBAAkB,KAAK,SAAS;wBAC5B,CAAC,CAAC,kBAAkB,KAAK,MAAM,IAAI,kBAAkB,KAAK,IAAI;wBAC9D,CAAC,CAAC,KAAK,CAAC;oBAEhB,MAAM,iBAAiB,GAAG,YAAY,CAAC,WAAW,CAAC;oBACnD,MAAM,WAAW,GACb,iBAA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,EAAE;oBACJ,sBAAa;oBACb;wBACI,KAAK,EAAE,sCAAgB;wBACvB,QAAQ,EAAE,IAAI;qBACjB;iBACJ;aACJ;YAED;gBACI,OAAO,EAAE,oCAAkB;gBAC3B,UAAU,EAAE,CAAC,GAAG,UAA6B,EAAE,EAAE;oBAC7C,OAAO,UAAU,CAAC;gBACtB,CAAC;gBACD,MAAM,EAAE,eAAe;aAC1B;YAED;gBACI,OAAO,EAAE,kBAAS;gBAClB,QAAQ,EAAE,uBAAa;aAC1B;YAED;gBACI,OAAO,EAAE,uBAAa;gBACtB,QAAQ,EAAE,uBAAa;aAC1B;YAED;gBACI,OAAO,EAAE,oCAA0B;gBACnC,UAAU,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,IAAI,oCAA0B,CAAC,MAAM,CAAC;gBACtE,MAAM,EAAE,CAAC,kBAAS,CAAC;aACtB;SACJ,CAAC;QAEF,OAAO;YACH,MAAM,EAAE,cAAY;YACpB,SAAS;YACT,OAAO,EAAE,CAAC,kBAAS,EAAE,uBAAa,EAAE,oCAA0B,CAAC;SAClE,CAAC;IACN,CAAC;CACJ,CAAA;AAxKY,oCAAY;uBAAZ,YAAY;IAFxB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,YAAY,CAwKxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infineit/winston-logger",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Enterprise-level logger integration package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -21,7 +21,6 @@
21
21
  "winston-slack-webhook-transport": "2.3.6"
22
22
  },
23
23
  "devDependencies": {
24
- "@types/uuid": "^9.0.6",
25
24
  "@types/winston": "^2.4.4",
26
25
  "rimraf": "^6.0.1"
27
26
  },