@gus-eip/loggers 3.2.6 → 3.2.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/dist/cloudwatch.logger.d.ts +2 -2
- package/dist/cloudwatch.logger.js +14 -12
- package/dist/interface.d.ts +2 -2
- package/package.json +1 -1
@@ -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,
|
12
|
-
error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string,
|
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,
|
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
|
-
|
86
|
-
|
85
|
+
sourcePayload,
|
86
|
+
destinationPayload,
|
87
87
|
logMessage,
|
88
88
|
brand,
|
89
|
-
|
90
|
-
|
91
|
-
|
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,
|
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
|
-
|
106
|
-
|
107
|
+
sourcePayload,
|
108
|
+
destinationPayload,
|
107
109
|
errorMessage,
|
108
110
|
brand,
|
109
|
-
|
110
|
-
|
111
|
-
|
111
|
+
secondaryKey,
|
112
|
+
destinationObjectType,
|
113
|
+
destinationObjectId,
|
112
114
|
};
|
113
115
|
await this.logToCloudWatch('error', logObject, logStreamName);
|
114
116
|
}
|
package/dist/interface.d.ts
CHANGED
@@ -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,
|
3
|
-
error(requestedId: string, timestamp: string, component: string, source: string, destination: string, event: string, usecase: string,
|
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/package.json
CHANGED