@gus-eip/loggers 3.2.6 → 3.2.8

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.
@@ -8,6 +8,6 @@ export declare class CloudWatchLoggerService implements ILogger {
8
8
  createLogStream(logStreamName: string): Promise<any>;
9
9
  logToCloudWatch(type: string, logObject: any, logStreamName: string): Promise<void>;
10
10
  logStreamExists(logStreamName: string): Promise<boolean>;
11
- log(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, source_payload: any, destination_payload: any, logMessage: any, brand: any, secondary_key: string, destination_ObjectType: string, destination_ObjectId: string, logStreamName: string): Promise<any>;
12
- error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, source_payload: any, destination_payload: any, errorMessage: any, brand: any, secondary_key: string, destination_ObjectType: string, destination_ObjectId: string, logStreamName: string): Promise<any>;
11
+ log(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, sourcePayload: any, destinationPayload: any, logMessage: any, brand: any, secondaryKey: string, logStreamName?: string, destinationObjectType?: string, destinationObjectId?: string, sourceObjectType?: string, sourceObjectId?: string): Promise<any>;
12
+ error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, sourcePayload: any, destinationPayload: any, errorMessage: any, brand: any, secondaryKey: string, destinationObjectType?: string, destinationObjectId?: string, logStreamName?: string): Promise<any>;
13
13
  }
@@ -72,7 +72,7 @@ let CloudWatchLoggerService = class CloudWatchLoggerService {
72
72
  throw error;
73
73
  }
74
74
  }
75
- async log(requestedId, timestamp, component, source, destination, event, usecase, source_payload, destination_payload, logMessage, brand, secondary_key, destination_ObjectType, destination_ObjectId, logStreamName) {
75
+ async log(requestedId, timestamp, component, source, destination, event, usecase, sourcePayload, destinationPayload, logMessage, brand, secondaryKey, logStreamName, destinationObjectType, destinationObjectId, sourceObjectType, sourceObjectId) {
76
76
  const logObject = {
77
77
  requestedId,
78
78
  timestamp,
@@ -82,17 +82,19 @@ let CloudWatchLoggerService = class CloudWatchLoggerService {
82
82
  destination,
83
83
  event,
84
84
  usecase,
85
- source_payload,
86
- destination_payload,
85
+ sourcePayload,
86
+ destinationPayload,
87
87
  logMessage,
88
88
  brand,
89
- secondary_key,
90
- destination_ObjectType,
91
- destination_ObjectId
89
+ secondaryKey,
90
+ destinationObjectType,
91
+ destinationObjectId,
92
+ sourceObjectType,
93
+ sourceObjectId,
92
94
  };
93
95
  await this.logToCloudWatch('info', logObject, logStreamName);
94
96
  }
95
- async error(requestedId, timestamp, component, source, destination, event, usecase, source_payload, destination_payload, errorMessage, brand, secondary_key, destination_ObjectType, destination_ObjectId, logStreamName) {
97
+ async error(requestedId, timestamp, component, source, destination, event, usecase, sourcePayload, destinationPayload, errorMessage, brand, secondaryKey, destinationObjectType, destinationObjectId, logStreamName) {
96
98
  const logObject = {
97
99
  requestedId,
98
100
  timestamp,
@@ -102,13 +104,13 @@ let CloudWatchLoggerService = class CloudWatchLoggerService {
102
104
  destination,
103
105
  event,
104
106
  usecase,
105
- source_payload,
106
- destination_payload,
107
+ sourcePayload,
108
+ destinationPayload,
107
109
  errorMessage,
108
110
  brand,
109
- secondary_key,
110
- destination_ObjectType,
111
- destination_ObjectId
111
+ secondaryKey,
112
+ destinationObjectType,
113
+ destinationObjectId,
112
114
  };
113
115
  await this.logToCloudWatch('error', logObject, logStreamName);
114
116
  }
package/dist/enum.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare class LoggerEnumService {
1
+ export declare class LoggerEnum {
2
2
  Event: {
3
3
  NEW_APPLICATION: string;
4
4
  POST_APPLICATION_DETAILS_TO_SNS: string;
package/dist/enum.js CHANGED
@@ -6,9 +6,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.LoggerEnumService = void 0;
9
+ exports.LoggerEnum = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
- let LoggerEnumService = class LoggerEnumService {
11
+ let LoggerEnum = class LoggerEnum {
12
12
  constructor() {
13
13
  this.Event = {
14
14
  NEW_APPLICATION: 'NEW_APPLICATION',
@@ -61,7 +61,7 @@ let LoggerEnumService = class LoggerEnumService {
61
61
  };
62
62
  }
63
63
  };
64
- LoggerEnumService = __decorate([
64
+ LoggerEnum = __decorate([
65
65
  (0, common_1.Injectable)()
66
- ], LoggerEnumService);
67
- exports.LoggerEnumService = LoggerEnumService;
66
+ ], LoggerEnum);
67
+ exports.LoggerEnum = LoggerEnum;
@@ -1,4 +1,4 @@
1
1
  export interface ILogger {
2
- log(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, source_payload: any, destination_payload: any, logMessage: any, brand: any, secondary_key: string, destination_ObjectType: string, destination_ObjectId: string, logStreamName: string): Promise<any>;
3
- error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, source_payload: any, destination_payload: any, errorMessage: any, brand: any, secondary_key: string, destination_ObjectType: string, destination_ObjectId: string, logStreamName: string): Promise<any>;
2
+ log(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, sourcePayload: any, destinationPayload: any, logMessage: any, brand: any, secondaryKey: string, logStreamName: string, destinationObjectType?: string, destinationObjectId?: string, sourceObjectType?: string, sourceObjectId?: string): Promise<any>;
3
+ error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string, sourcePayload: any, destinationPayload: any, errorMessage: any, brand: any, secondaryKey: string, logStreamName?: string, destinationObjectType?: string, destinationObjectId?: string, sourceObjectType?: string, sourceObjectId?: string): Promise<any>;
4
4
  }
package/dist/module.js CHANGED
@@ -23,8 +23,8 @@ let LoggerModule = LoggerModule_1 = class LoggerModule {
23
23
  };
24
24
  return {
25
25
  module: LoggerModule_1,
26
- exports: [cloudwatchProvider, cloudwatchProviders, enum_1.LoggerEnumService],
27
- providers: [cloudwatchProvider, cloudwatchProviders, enum_1.LoggerEnumService],
26
+ exports: [cloudwatchProvider, cloudwatchProviders, enum_1.LoggerEnum],
27
+ providers: [cloudwatchProvider, cloudwatchProviders, enum_1.LoggerEnum],
28
28
  };
29
29
  }
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gus-eip/loggers",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "description": "@gus-eip/loggers is a package designed to provide logging functionality for your Node.js applications.",
5
5
  "author": "gus",
6
6
  "readmeFilename": "README.md",