@icd-iot-aicf/nestjs-logger 0.0.1
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/.babelrc +20 -0
- package/.env +0 -0
- package/README.md +85 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +23 -0
- package/dist/app.module.js.map +1 -0
- package/dist/app.service.d.ts +3 -0
- package/dist/app.service.js +20 -0
- package/dist/app.service.js.map +1 -0
- package/dist/common/async-storage/external-transaction-info.d.ts +2 -0
- package/dist/common/async-storage/external-transaction-info.js +6 -0
- package/dist/common/async-storage/external-transaction-info.js.map +1 -0
- package/dist/common/async-storage/tracnsaction-info.d.ts +2 -0
- package/dist/common/async-storage/tracnsaction-info.js +6 -0
- package/dist/common/async-storage/tracnsaction-info.js.map +1 -0
- package/dist/common/dto/result.dto.d.ts +12 -0
- package/dist/common/dto/result.dto.js +12 -0
- package/dist/common/dto/result.dto.js.map +1 -0
- package/dist/common/helper/error.d.ts +4 -0
- package/dist/common/helper/error.js +15 -0
- package/dist/common/helper/error.js.map +1 -0
- package/dist/common/helper/response.d.ts +3 -0
- package/dist/common/helper/response.js +161 -0
- package/dist/common/helper/response.js.map +1 -0
- package/dist/common/internal-logs-info.module.d.ts +3 -0
- package/dist/common/internal-logs-info.module.js +27 -0
- package/dist/common/internal-logs-info.module.js.map +1 -0
- package/dist/common/service/common/context.service.d.ts +6 -0
- package/dist/common/service/common/context.service.js +34 -0
- package/dist/common/service/common/context.service.js.map +1 -0
- package/dist/config/app-log-config.module.d.ts +5 -0
- package/dist/config/app-log-config.module.js +32 -0
- package/dist/config/app-log-config.module.js.map +1 -0
- package/dist/config/app-log-config.service.d.ts +6 -0
- package/dist/config/app-log-config.service.js +30 -0
- package/dist/config/app-log-config.service.js.map +1 -0
- package/dist/config/configurations.d.ts +12 -0
- package/dist/config/configurations.js +10 -0
- package/dist/config/configurations.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/aicf/dtos/aicf-manual.dto.d.ts +95 -0
- package/dist/logger/aicf/dtos/aicf-manual.dto.js +177 -0
- package/dist/logger/aicf/dtos/aicf-manual.dto.js.map +1 -0
- package/dist/logger/aicf/dtos/aicf.dto.d.ts +189 -0
- package/dist/logger/aicf/dtos/aicf.dto.js +167 -0
- package/dist/logger/aicf/dtos/aicf.dto.js.map +1 -0
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.d.ts +7 -0
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.js +78 -0
- package/dist/logger/aicf/interceptors/aicf-amqp.interceptor.js.map +1 -0
- package/dist/logger/aicf/interceptors/aicf.interceptor.d.ts +9 -0
- package/dist/logger/aicf/interceptors/aicf.interceptor.js +39 -0
- package/dist/logger/aicf/interceptors/aicf.interceptor.js.map +1 -0
- package/dist/logger/aicf/middleware/aicf.middleware.d.ts +8 -0
- package/dist/logger/aicf/middleware/aicf.middleware.js +99 -0
- package/dist/logger/aicf/middleware/aicf.middleware.js.map +1 -0
- package/dist/logger/aicf/services/aicf-endpoint.service.d.ts +12 -0
- package/dist/logger/aicf/services/aicf-endpoint.service.js +117 -0
- package/dist/logger/aicf/services/aicf-endpoint.service.js.map +1 -0
- package/dist/logger/cloudron/decorators/cloudron.decorators.d.ts +0 -0
- package/dist/logger/cloudron/decorators/cloudron.decorators.js +1 -0
- package/dist/logger/cloudron/decorators/cloudron.decorators.js.map +1 -0
- package/dist/logger/cloudron/dtos/logger.cauldron.dto.d.ts +184 -0
- package/dist/logger/cloudron/dtos/logger.cauldron.dto.js +123 -0
- package/dist/logger/cloudron/dtos/logger.cauldron.dto.js.map +1 -0
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.d.ts +9 -0
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.js +39 -0
- package/dist/logger/cloudron/intercepters/cloudron.interceptor.js.map +1 -0
- package/dist/logger/cloudron/middleware/cloudron.middleware.d.ts +10 -0
- package/dist/logger/cloudron/middleware/cloudron.middleware.js +78 -0
- package/dist/logger/cloudron/middleware/cloudron.middleware.js.map +1 -0
- package/dist/logger/cloudron/services/cloudron-details-logs.service.d.ts +13 -0
- package/dist/logger/cloudron/services/cloudron-details-logs.service.js +79 -0
- package/dist/logger/cloudron/services/cloudron-details-logs.service.js.map +1 -0
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.d.ts +8 -0
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.js +47 -0
- package/dist/logger/cloudron/services/cloudron-summary-logs.service.js.map +1 -0
- package/dist/logger/core/database/hook-ingress.database.d.ts +8 -0
- package/dist/logger/core/database/hook-ingress.database.js +212 -0
- package/dist/logger/core/database/hook-ingress.database.js.map +1 -0
- package/dist/logger/core/decorators/customDecorators.d.ts +24 -0
- package/dist/logger/core/decorators/customDecorators.js +113 -0
- package/dist/logger/core/decorators/customDecorators.js.map +1 -0
- package/dist/logger/core/dtos/core.dto.d.ts +6 -0
- package/dist/logger/core/dtos/core.dto.js +3 -0
- package/dist/logger/core/dtos/core.dto.js.map +1 -0
- package/dist/logger/core/dtos/log-entry-class.d.ts +11 -0
- package/dist/logger/core/dtos/log-entry-class.js +15 -0
- package/dist/logger/core/dtos/log-entry-class.js.map +1 -0
- package/dist/logger/core/enum/enum.d.ts +51 -0
- package/dist/logger/core/enum/enum.js +217 -0
- package/dist/logger/core/enum/enum.js.map +1 -0
- package/dist/logger/core/functions/error-reponse.d.ts +2 -0
- package/dist/logger/core/functions/error-reponse.js +18 -0
- package/dist/logger/core/functions/error-reponse.js.map +1 -0
- package/dist/logger/core/functions/global-function.d.ts +24 -0
- package/dist/logger/core/functions/global-function.js +79 -0
- package/dist/logger/core/functions/global-function.js.map +1 -0
- package/dist/logger/core/interceptors/amqp.interceptor.d.ts +6 -0
- package/dist/logger/core/interceptors/amqp.interceptor.js +45 -0
- package/dist/logger/core/interceptors/amqp.interceptor.js.map +1 -0
- package/dist/logger/core/interceptors/core-logs.interceptor.d.ts +18 -0
- package/dist/logger/core/interceptors/core-logs.interceptor.js +73 -0
- package/dist/logger/core/interceptors/core-logs.interceptor.js.map +1 -0
- package/dist/logger/core/interceptors/http.interceptor.d.ts +5 -0
- package/dist/logger/core/interceptors/http.interceptor.js +28 -0
- package/dist/logger/core/interceptors/http.interceptor.js.map +1 -0
- package/dist/logger/core/interceptors/interceptors.d.ts +3 -0
- package/dist/logger/core/interceptors/interceptors.js +20 -0
- package/dist/logger/core/interceptors/interceptors.js.map +1 -0
- package/dist/logger/core/middleware/http-logs-middleware.service.d.ts +15 -0
- package/dist/logger/core/middleware/http-logs-middleware.service.js +55 -0
- package/dist/logger/core/middleware/http-logs-middleware.service.js.map +1 -0
- package/dist/logger/core/module/amqp/amqp.module.d.ts +2 -0
- package/dist/logger/core/module/amqp/amqp.module.js +43 -0
- package/dist/logger/core/module/amqp/amqp.module.js.map +1 -0
- package/dist/logger/core/services/summary-flush.service.d.ts +7 -0
- package/dist/logger/core/services/summary-flush.service.js +31 -0
- package/dist/logger/core/services/summary-flush.service.js.map +1 -0
- package/dist/logger/esb/dtos/logger.esb.dto.d.ts +136 -0
- package/dist/logger/esb/dtos/logger.esb.dto.js +99 -0
- package/dist/logger/esb/dtos/logger.esb.dto.js.map +1 -0
- package/dist/logger/esb/intercepters/esb.interceptor.d.ts +9 -0
- package/dist/logger/esb/intercepters/esb.interceptor.js +36 -0
- package/dist/logger/esb/intercepters/esb.interceptor.js.map +1 -0
- package/dist/logger/esb/middleware/esb.middleware.d.ts +10 -0
- package/dist/logger/esb/middleware/esb.middleware.js +64 -0
- package/dist/logger/esb/middleware/esb.middleware.js.map +1 -0
- package/dist/logger/esb/services/external-logs-esb.service.d.ts +10 -0
- package/dist/logger/esb/services/external-logs-esb.service.js +98 -0
- package/dist/logger/esb/services/external-logs-esb.service.js.map +1 -0
- package/dist/logger/logger.middleware.d.ts +0 -0
- package/dist/logger/logger.middleware.js +1 -0
- package/dist/logger/logger.middleware.js.map +1 -0
- package/dist/logger/logger.module.d.ts +2 -0
- package/dist/logger/logger.module.js +58 -0
- package/dist/logger/logger.module.js.map +1 -0
- package/dist/logger/logger.service.d.ts +12 -0
- package/dist/logger/logger.service.js +119 -0
- package/dist/logger/logger.service.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +15 -0
- package/dist/main.js.map +1 -0
- package/dist/metrics/metrics.middleware.d.ts +16 -0
- package/dist/metrics/metrics.middleware.js +59 -0
- package/dist/metrics/metrics.middleware.js.map +1 -0
- package/dist/metrics/metrics.module.d.ts +5 -0
- package/dist/metrics/metrics.module.js +40 -0
- package/dist/metrics/metrics.module.js.map +1 -0
- package/dist/metrics/metrics.service.d.ts +11 -0
- package/dist/metrics/metrics.service.js +111 -0
- package/dist/metrics/metrics.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/utils/tools.d.ts +6 -0
- package/dist/utils/tools.js +48 -0
- package/dist/utils/tools.js.map +1 -0
- package/package.json +92 -0
- package/tsconfig.build.json +4 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CAICFDetailEndpoint = exports.CAICFDetail = exports.CAICFSummary = exports.SUB_AMQP_ACTION = exports.SUB_DB_ACTION = exports.SUB_HTTP_ACTION = exports.ACTION_TYPE = exports.LOG_LEVEL = exports.RECORD_SUB_TYPE = exports.RECORD_TYPE = void 0;
|
|
7
|
+
exports.MapRequestFormat = MapRequestFormat;
|
|
8
|
+
exports.MapResponseFormat = MapResponseFormat;
|
|
9
|
+
const microtime_1 = __importDefault(require("microtime"));
|
|
10
|
+
const tools_1 = require("../../../utils/tools");
|
|
11
|
+
const os_1 = __importDefault(require("os"));
|
|
12
|
+
const app_log_config_service_1 = require("../../../config/app-log-config.service");
|
|
13
|
+
var RECORD_TYPE;
|
|
14
|
+
(function (RECORD_TYPE) {
|
|
15
|
+
RECORD_TYPE["SUMMARY"] = "summary";
|
|
16
|
+
RECORD_TYPE["DETAIL"] = "detail";
|
|
17
|
+
})(RECORD_TYPE || (exports.RECORD_TYPE = RECORD_TYPE = {}));
|
|
18
|
+
var RECORD_SUB_TYPE;
|
|
19
|
+
(function (RECORD_SUB_TYPE) {
|
|
20
|
+
RECORD_SUB_TYPE["INBOUND_OUTBOUND"] = "inbound-outbound";
|
|
21
|
+
RECORD_SUB_TYPE["ENDPOINT"] = "endpoint";
|
|
22
|
+
RECORD_SUB_TYPE["APP_LOGIC"] = "appLogic";
|
|
23
|
+
RECORD_SUB_TYPE["EXCEPTION"] = "exception";
|
|
24
|
+
})(RECORD_SUB_TYPE || (exports.RECORD_SUB_TYPE = RECORD_SUB_TYPE = {}));
|
|
25
|
+
var LOG_LEVEL;
|
|
26
|
+
(function (LOG_LEVEL) {
|
|
27
|
+
LOG_LEVEL["INFO"] = "info";
|
|
28
|
+
LOG_LEVEL["WARNING"] = "warning";
|
|
29
|
+
LOG_LEVEL["ERROR"] = "error";
|
|
30
|
+
LOG_LEVEL["DEBUG"] = "debug";
|
|
31
|
+
})(LOG_LEVEL || (exports.LOG_LEVEL = LOG_LEVEL = {}));
|
|
32
|
+
var ACTION_TYPE;
|
|
33
|
+
(function (ACTION_TYPE) {
|
|
34
|
+
ACTION_TYPE["HTTP"] = "HTTP";
|
|
35
|
+
ACTION_TYPE["AMQP"] = "AMQP";
|
|
36
|
+
ACTION_TYPE["DATABASE"] = "DATABASE";
|
|
37
|
+
ACTION_TYPE["KAFKA"] = "KAFKA EVENT";
|
|
38
|
+
ACTION_TYPE["RABBITMQ"] = "RABBITMQ EVENT";
|
|
39
|
+
ACTION_TYPE["APP_LOGIC"] = "APP LOGIC";
|
|
40
|
+
ACTION_TYPE["EXCEPTION"] = "EXCEPTION";
|
|
41
|
+
})(ACTION_TYPE || (exports.ACTION_TYPE = ACTION_TYPE = {}));
|
|
42
|
+
var SUB_HTTP_ACTION;
|
|
43
|
+
(function (SUB_HTTP_ACTION) {
|
|
44
|
+
SUB_HTTP_ACTION["GET"] = "GET";
|
|
45
|
+
SUB_HTTP_ACTION["POST"] = "POST";
|
|
46
|
+
SUB_HTTP_ACTION["PATCH"] = "PATCH";
|
|
47
|
+
SUB_HTTP_ACTION["PUT"] = "PUT";
|
|
48
|
+
SUB_HTTP_ACTION["DELETE"] = "DELETE";
|
|
49
|
+
})(SUB_HTTP_ACTION || (exports.SUB_HTTP_ACTION = SUB_HTTP_ACTION = {}));
|
|
50
|
+
var SUB_DB_ACTION;
|
|
51
|
+
(function (SUB_DB_ACTION) {
|
|
52
|
+
SUB_DB_ACTION["CREATE"] = "CREATE";
|
|
53
|
+
SUB_DB_ACTION["READE"] = "READE";
|
|
54
|
+
SUB_DB_ACTION["UPDATE"] = "UPDATE";
|
|
55
|
+
SUB_DB_ACTION["REMOVE"] = "REMOVE";
|
|
56
|
+
})(SUB_DB_ACTION || (exports.SUB_DB_ACTION = SUB_DB_ACTION = {}));
|
|
57
|
+
var SUB_AMQP_ACTION;
|
|
58
|
+
(function (SUB_AMQP_ACTION) {
|
|
59
|
+
SUB_AMQP_ACTION["PRODUCE"] = "PRODUCE";
|
|
60
|
+
SUB_AMQP_ACTION["CONSUME"] = "CONSUME";
|
|
61
|
+
})(SUB_AMQP_ACTION || (exports.SUB_AMQP_ACTION = SUB_AMQP_ACTION = {}));
|
|
62
|
+
class CAICFSummary {
|
|
63
|
+
constructor(summaryData) {
|
|
64
|
+
const appConfig = app_log_config_service_1.AppLogConfigService.getConfig();
|
|
65
|
+
const headers = summaryData.request.headers;
|
|
66
|
+
this.timestamp = (0, tools_1.parseUnixMicroToIsoWithTimezone)(microtime_1.default.now());
|
|
67
|
+
this.level = summaryData.logLevel;
|
|
68
|
+
this.appName = appConfig.appName;
|
|
69
|
+
this.componentName = appConfig.componentName;
|
|
70
|
+
this.recordName = summaryData.recordName;
|
|
71
|
+
this.recordType = RECORD_TYPE.SUMMARY;
|
|
72
|
+
this.channel = headers['referer'] || null;
|
|
73
|
+
this.instance = os_1.default.hostname();
|
|
74
|
+
this.transactionId = headers['x-ais-orderref'];
|
|
75
|
+
this.sessionId = summaryData.sessionId;
|
|
76
|
+
this.appResult = summaryData.resultMessage;
|
|
77
|
+
this.appResultCode = summaryData.resultCode;
|
|
78
|
+
this.serviceStartTime = (0, tools_1.parseUnixMicroToIsoWithTimezone)(summaryData.startTime);
|
|
79
|
+
this.serviceEndTime = (0, tools_1.parseUnixMicroToIsoWithTimezone)(summaryData.endTime);
|
|
80
|
+
this.serviceTime = (0, tools_1.calculateDifferentTimeMicroToMilli)(summaryData.startTime, summaryData.endTime);
|
|
81
|
+
const originSession = headers['x-ais-origin-session'] || null;
|
|
82
|
+
if (originSession) {
|
|
83
|
+
this.additionalInfo = {
|
|
84
|
+
'x-session-path': originSession,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.CAICFSummary = CAICFSummary;
|
|
90
|
+
class BasicInfoDetail {
|
|
91
|
+
constructor(detailData) {
|
|
92
|
+
const appConfig = app_log_config_service_1.AppLogConfigService.getConfig();
|
|
93
|
+
const headers = detailData.request.headers;
|
|
94
|
+
this.timestamp = (0, tools_1.parseUnixMicroToIsoWithTimezone)(microtime_1.default.now());
|
|
95
|
+
this.recordType = RECORD_TYPE.DETAIL;
|
|
96
|
+
this.appName = appConfig.appName;
|
|
97
|
+
this.componentName = appConfig.componentName;
|
|
98
|
+
this.recordName = detailData.recordName;
|
|
99
|
+
this.channel = headers['referer'] || null;
|
|
100
|
+
this.instance = os_1.default.hostname();
|
|
101
|
+
this.transactionId = headers['x-ais-orderref'];
|
|
102
|
+
this.sessionId = detailData.sessionId;
|
|
103
|
+
this.serviceStartTime = (0, tools_1.parseUnixMicroToIsoWithTimezone)(detailData.startTime);
|
|
104
|
+
this.serviceEndTime = (0, tools_1.parseUnixMicroToIsoWithTimezone)(detailData.endTime);
|
|
105
|
+
this.serviceTime = (0, tools_1.calculateDifferentTimeMicroToMilli)(detailData.startTime, detailData.endTime);
|
|
106
|
+
const reqResObject = {
|
|
107
|
+
requestObject: detailData.request,
|
|
108
|
+
responseObject: detailData.response,
|
|
109
|
+
};
|
|
110
|
+
this.message = JSON.stringify(reqResObject);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
class CAICFDetail extends BasicInfoDetail {
|
|
114
|
+
constructor(detailData) {
|
|
115
|
+
super(detailData);
|
|
116
|
+
this.action = detailData.action;
|
|
117
|
+
this.subAction = detailData.subAction;
|
|
118
|
+
this.recordSubType = RECORD_SUB_TYPE.INBOUND_OUTBOUND;
|
|
119
|
+
this.level = detailData.logLevel;
|
|
120
|
+
this.appResult = detailData.resultCode;
|
|
121
|
+
this.appResultCode = detailData.resultMessage;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.CAICFDetail = CAICFDetail;
|
|
125
|
+
class CAICFDetailEndpoint extends BasicInfoDetail {
|
|
126
|
+
constructor(detailEndpoint) {
|
|
127
|
+
super(detailEndpoint);
|
|
128
|
+
this.action = detailEndpoint.action;
|
|
129
|
+
this.subAction = detailEndpoint.subAction;
|
|
130
|
+
this.recordSubType = RECORD_SUB_TYPE.INBOUND_OUTBOUND;
|
|
131
|
+
this.level = detailEndpoint.logLevel;
|
|
132
|
+
this.dependency = detailEndpoint.dependency;
|
|
133
|
+
this.subSessionId = detailEndpoint.subSessionId;
|
|
134
|
+
this.recordSubType = RECORD_SUB_TYPE.ENDPOINT;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.CAICFDetailEndpoint = CAICFDetailEndpoint;
|
|
138
|
+
function MapRequestFormat(req, baseURL = null) {
|
|
139
|
+
const routeParameters = req.params;
|
|
140
|
+
const fullUrl = baseURL ? baseURL + req.url : req.baseURL + req.url;
|
|
141
|
+
const queryString = (0, tools_1.extractQueryParams)(fullUrl);
|
|
142
|
+
return {
|
|
143
|
+
url: fullUrl,
|
|
144
|
+
headers: req.headers,
|
|
145
|
+
method: req.method.toUpperCase(),
|
|
146
|
+
payload: req.body,
|
|
147
|
+
queryString: queryString,
|
|
148
|
+
routeParameters: routeParameters,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function MapResponseFormat(response) {
|
|
152
|
+
try {
|
|
153
|
+
return {
|
|
154
|
+
httpStatusCode: response.status,
|
|
155
|
+
headers: response.headers,
|
|
156
|
+
payload: response.body || {},
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
catch (e) {
|
|
160
|
+
return {
|
|
161
|
+
httpStatusCode: 500,
|
|
162
|
+
headers: {},
|
|
163
|
+
payload: e,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=aicf.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aicf.dto.js","sourceRoot":"","sources":["../../../../src/logger/aicf/dtos/aicf.dto.ts"],"names":[],"mappings":";;;;;;AA+LA,4CAYC;AAED,8CAeC;AA5ND,0DAAkC;AAClC,gDAI8B;AAC9B,4CAAoB;AACpB,mFAA6E;AAE7E,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wDAAqC,CAAA;IACrC,wCAAqB,CAAA;IACrB,yCAAsB,CAAA;IACtB,0CAAuB,CAAA;AACzB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,4BAAe,CAAA;AACjB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAED,IAAY,WAQX;AARD,WAAY,WAAW;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L,cAAc,EAAE,GAAG;YACnB,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,CAAC;SACX,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { CustomLoggerService } from '../../logger.service';
|
|
3
|
+
export declare class AicfAmqpInterceptor {
|
|
4
|
+
private readonly logger;
|
|
5
|
+
constructor(logger: CustomLoggerService);
|
|
6
|
+
intercept(context: ExecutionContext): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AicfAmqpInterceptor = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const tools_1 = require("../../../utils/tools");
|
|
18
|
+
const microtime_1 = __importDefault(require("microtime"));
|
|
19
|
+
const aicf_dto_1 = require("../dtos/aicf.dto");
|
|
20
|
+
const logger_service_1 = require("../../logger.service");
|
|
21
|
+
let AicfAmqpInterceptor = class AicfAmqpInterceptor {
|
|
22
|
+
constructor(logger) {
|
|
23
|
+
this.logger = logger;
|
|
24
|
+
}
|
|
25
|
+
intercept(context) {
|
|
26
|
+
const startTime = microtime_1.default.now();
|
|
27
|
+
const sessionId = startTime.toString();
|
|
28
|
+
let request = {};
|
|
29
|
+
try {
|
|
30
|
+
const data = context.switchToRpc().getData();
|
|
31
|
+
const subSessionId = (0, tools_1.generateRandomString)();
|
|
32
|
+
const headers = {
|
|
33
|
+
'x-ais-orderref': (0, tools_1.generateTID)(),
|
|
34
|
+
'x-origin-session': `${sessionId}|${subSessionId}`,
|
|
35
|
+
};
|
|
36
|
+
request = {
|
|
37
|
+
method: 'CONSUME',
|
|
38
|
+
url: 'amqp://connectivity.v1.ex|api.v2.thing.678099a9b5420000246189d2.heartbeat',
|
|
39
|
+
headers: headers,
|
|
40
|
+
exchange: 'connectivity.v1.ex',
|
|
41
|
+
routingKey: 'api.v2.thing.678099a9b5420000246189d2.heartbeat',
|
|
42
|
+
payload: data,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.log(e);
|
|
47
|
+
}
|
|
48
|
+
const endTime = microtime_1.default.now();
|
|
49
|
+
this.logger.log(new aicf_dto_1.CAICFDetail({
|
|
50
|
+
resultCode: '20000',
|
|
51
|
+
resultMessage: 'pub success',
|
|
52
|
+
action: aicf_dto_1.ACTION_TYPE.AMQP,
|
|
53
|
+
endTime: endTime,
|
|
54
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
55
|
+
request: request,
|
|
56
|
+
startTime: startTime,
|
|
57
|
+
sessionId: sessionId,
|
|
58
|
+
recordName: '',
|
|
59
|
+
subAction: request.method.toUpperCase(),
|
|
60
|
+
}));
|
|
61
|
+
this.logger.log(new aicf_dto_1.CAICFSummary({
|
|
62
|
+
resultCode: '20000',
|
|
63
|
+
resultMessage: 'pub success',
|
|
64
|
+
endTime: endTime,
|
|
65
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
66
|
+
request: request,
|
|
67
|
+
startTime: startTime,
|
|
68
|
+
sessionId: sessionId,
|
|
69
|
+
recordName: '',
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.AicfAmqpInterceptor = AicfAmqpInterceptor;
|
|
74
|
+
exports.AicfAmqpInterceptor = AicfAmqpInterceptor = __decorate([
|
|
75
|
+
(0, common_1.Injectable)(),
|
|
76
|
+
__metadata("design:paramtypes", [logger_service_1.CustomLoggerService])
|
|
77
|
+
], AicfAmqpInterceptor);
|
|
78
|
+
//# sourceMappingURL=aicf-amqp.interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aicf-amqp.interceptor.js","sourceRoot":"","sources":["../../../../src/logger/aicf/interceptors/aicf-amqp.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAGwB;AACxB,gDAAyE;AACzE,0DAAkC;AAClC,+CAK0B;AAC1B,yDAA2D;AAGpD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAA6B,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;IAC5D,SAAS,CAAC,OAAyB;QACjC,MAAM,SAAS,GAAG,mBAAS,CAAC,GAAG,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,GAAQ,EAAE,CAAC;QAEtB,IAAI,CAAC;YAEH,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;YAC7C,MAAM,YAAY,GAAG,IAAA,4BAAoB,GAAE,CAAC;YAC5C,MAAM,OAAO,GAAG;gBACd,gBAAgB,EAAE,IAAA,mBAAW,GAAE;gBAC/B,kBAAkB,EAAE,GAAG,SAAS,IAAI,YAAY,EAAE;aACnD,CAAC;YACF,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oint.service';
|
|
3
|
+
export declare class AICFInterceptor {
|
|
4
|
+
private aicfEndpointService;
|
|
5
|
+
constructor(aicfEndpointService: AicfEndpointService);
|
|
6
|
+
requestInterceptor(request: any): any;
|
|
7
|
+
responseInterceptor(response: AxiosResponse): AxiosResponse<any, any>;
|
|
8
|
+
errorInterceptor(error: any): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AICFInterceptor = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const aicf_endpoint_service_1 = require("../services/aicf-endpoint.service");
|
|
15
|
+
const global_function_1 = require("../../core/functions/global-function");
|
|
16
|
+
let AICFInterceptor = class AICFInterceptor {
|
|
17
|
+
constructor(aicfEndpointService) {
|
|
18
|
+
this.aicfEndpointService = aicfEndpointService;
|
|
19
|
+
}
|
|
20
|
+
requestInterceptor(request) {
|
|
21
|
+
const externalRefInfo = (0, global_function_1.GetExternalTransactionInfo)();
|
|
22
|
+
request.headers = this.aicfEndpointService.modHeaderAicf(request.headers, externalRefInfo.subSessionId);
|
|
23
|
+
this.aicfEndpointService.requestLog(request, externalRefInfo.subSessionId, externalRefInfo);
|
|
24
|
+
return request;
|
|
25
|
+
}
|
|
26
|
+
responseInterceptor(response) {
|
|
27
|
+
this.aicfEndpointService.responseLog(response);
|
|
28
|
+
return response;
|
|
29
|
+
}
|
|
30
|
+
errorInterceptor(error) {
|
|
31
|
+
this.aicfEndpointService.responseLogError(error);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.AICFInterceptor = AICFInterceptor;
|
|
35
|
+
exports.AICFInterceptor = AICFInterceptor = __decorate([
|
|
36
|
+
(0, common_1.Injectable)(),
|
|
37
|
+
__metadata("design:paramtypes", [aicf_endpoint_service_1.AicfEndpointService])
|
|
38
|
+
], AICFInterceptor);
|
|
39
|
+
//# sourceMappingURL=aicf.interceptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aicf.interceptor.js","sourceRoot":"","sources":["../../../../src/logger/aicf/interceptors/aicf.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,6EAAwE;AACxE,0EAAkF;AAG3E,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAAoB,mBAAwC;QAAxC,wBAAmB,GAAnB,mBAAmB,CAAqB;IAAG,CAAC;IAEhE,kBAAkB,CAAC,OAAY;QAC7B,MAAM,eAAe,GAAG,IAAA,4CAA0B,GAAE,CAAC;QACrD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,CACtD,OAAO,CAAC,OAAO,EACf,eAAe,CAAC,YAAY,CAC7B,CAAC;QACF,IAAI,CAAC,mBAAmB,CAAC,UAAU,CACjC,OAAO,EACP,eAAe,CAAC,YAAY,EAC5B,eAAe,CAChB,CAAC;QACF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,mBAAmB,CAAC,QAAuB;QACzC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB,CAAC,KAAU;QACzB,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;CACF,CAAA;AAzBY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAE8B,2CAAmB;GADjD,eAAe,CAyB3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NestMiddleware } from '@nestjs/common';
|
|
2
|
+
import { CustomLoggerService } from '../../logger.service';
|
|
3
|
+
import { NextFunction, Request, Response } from 'express';
|
|
4
|
+
export declare class AicfMiddleware implements NestMiddleware {
|
|
5
|
+
private readonly logger;
|
|
6
|
+
constructor(logger: CustomLoggerService);
|
|
7
|
+
use(req: Request, res: Response, next: NextFunction): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AicfMiddleware = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const microtime_1 = __importDefault(require("microtime"));
|
|
18
|
+
const aicf_dto_1 = require("../dtos/aicf.dto");
|
|
19
|
+
const logger_service_1 = require("../../logger.service");
|
|
20
|
+
const tools_1 = require("../../../utils/tools");
|
|
21
|
+
const global_function_1 = require("../../core/functions/global-function");
|
|
22
|
+
let AicfMiddleware = class AicfMiddleware {
|
|
23
|
+
constructor(logger) {
|
|
24
|
+
this.logger = logger;
|
|
25
|
+
}
|
|
26
|
+
use(req, res, next) {
|
|
27
|
+
const startTime = microtime_1.default.now();
|
|
28
|
+
const sessionId = startTime.toString();
|
|
29
|
+
const chunks = [];
|
|
30
|
+
const originalWrite = res.write;
|
|
31
|
+
const originalEnd = res.end;
|
|
32
|
+
req.headers['x-ais-orderref'] ??= (0, tools_1.generateTID)();
|
|
33
|
+
res.header('x-ais-orderref', req.headers['x-ais-orderref']);
|
|
34
|
+
res.write = (...args) => {
|
|
35
|
+
chunks.push(Buffer.from(args[0]));
|
|
36
|
+
return originalWrite.apply(res, args);
|
|
37
|
+
};
|
|
38
|
+
res.end = (...args) => {
|
|
39
|
+
const endTime = microtime_1.default.now();
|
|
40
|
+
if (args[0]) {
|
|
41
|
+
chunks.push(Buffer.from(args[0]));
|
|
42
|
+
}
|
|
43
|
+
const buffer = Buffer.concat(chunks).toString('utf8');
|
|
44
|
+
res.on('finish', () => {
|
|
45
|
+
const recordName = (0, global_function_1.GetTransactionReference)().recordName;
|
|
46
|
+
const requestFormat = (0, aicf_dto_1.MapRequestFormat)(req, req.headers.host);
|
|
47
|
+
const response = {
|
|
48
|
+
status: res.status,
|
|
49
|
+
headers: res.getHeaders(),
|
|
50
|
+
body: buffer,
|
|
51
|
+
};
|
|
52
|
+
const responseFormat = (0, aicf_dto_1.MapResponseFormat)(response);
|
|
53
|
+
this.logger.log(new aicf_dto_1.CAICFDetail({
|
|
54
|
+
resultCode: res.statusCode.toString(),
|
|
55
|
+
resultMessage: res.statusMessage,
|
|
56
|
+
action: aicf_dto_1.ACTION_TYPE.HTTP,
|
|
57
|
+
endTime: endTime,
|
|
58
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
59
|
+
request: requestFormat,
|
|
60
|
+
response: responseFormat,
|
|
61
|
+
startTime: startTime,
|
|
62
|
+
sessionId: sessionId,
|
|
63
|
+
recordName: recordName,
|
|
64
|
+
subAction: req.method.toUpperCase(),
|
|
65
|
+
}));
|
|
66
|
+
this.logger.log(new aicf_dto_1.CAICFSummary({
|
|
67
|
+
resultCode: res.statusCode.toString(),
|
|
68
|
+
resultMessage: res.statusMessage,
|
|
69
|
+
endTime: endTime,
|
|
70
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
71
|
+
request: requestFormat,
|
|
72
|
+
response: responseFormat,
|
|
73
|
+
startTime: startTime,
|
|
74
|
+
sessionId: sessionId,
|
|
75
|
+
recordName: recordName,
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
78
|
+
res.on('error', (err) => {
|
|
79
|
+
console.debug(err);
|
|
80
|
+
});
|
|
81
|
+
return originalEnd.apply(res, args);
|
|
82
|
+
};
|
|
83
|
+
(0, global_function_1.SetTransactionReference)({
|
|
84
|
+
transactionId: req.headers['x-ais-orderref'],
|
|
85
|
+
sessionId: sessionId,
|
|
86
|
+
action: aicf_dto_1.ACTION_TYPE.HTTP,
|
|
87
|
+
originSession: req.headers['x-origin-session'],
|
|
88
|
+
serviceStartTime: startTime,
|
|
89
|
+
}, () => {
|
|
90
|
+
return next();
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.AicfMiddleware = AicfMiddleware;
|
|
95
|
+
exports.AicfMiddleware = AicfMiddleware = __decorate([
|
|
96
|
+
(0, common_1.Injectable)(),
|
|
97
|
+
__metadata("design:paramtypes", [logger_service_1.CustomLoggerService])
|
|
98
|
+
], AicfMiddleware);
|
|
99
|
+
//# sourceMappingURL=aicf.middleware.js.map
|
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OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,oBAAS,CAAC,IAAI;oBACxB,OAAO,EAAE,aAAa;oBACtB,QAAQ,EAAE,cAAc;oBACxB,SAAS,EAAE,SAAS;oBACpB,SAAS,EAAE,SAAS;oBACpB,UAAU,EAAE,UAAU;iBACvB,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;gBACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;YACH,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC,CAAC;QACF,IAAA,yCAAuB,EACrB;YACE,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAW;YACtD,SAAS,EAAE,SAAS;YACpB,MAAM,EAAE,sBAAW,CAAC,IAAI;YACxB,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAW;YACxD,gBAAgB,EAAE,SAAS;SAC5B,EACD,GAAG,EAAE;YACH,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC,CACF,CAAC;IACJ,CAAC;CACF,CAAA;AAlFY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAE0B,oCAAmB;GAD7C,cAAc,CAkF1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CustomLoggerService } from '../../logger.service';
|
|
2
|
+
import { ContextService } from '../../../common/service/common/context.service';
|
|
3
|
+
import { ExternalTransactionInfo } from '../../core/functions/global-function';
|
|
4
|
+
export declare class AicfEndpointService {
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly contextService;
|
|
7
|
+
constructor(logger: CustomLoggerService, contextService: ContextService);
|
|
8
|
+
modHeaderAicf(headers: any, subSessionId: string): any;
|
|
9
|
+
requestLog(request: any, subSessionId: string, externalInfo: ExternalTransactionInfo): void;
|
|
10
|
+
responseLog(response: any): void;
|
|
11
|
+
responseLogError(error: any): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AicfEndpointService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const logger_service_1 = require("../../logger.service");
|
|
18
|
+
const context_service_1 = require("../../../common/service/common/context.service");
|
|
19
|
+
const aicf_dto_1 = require("../dtos/aicf.dto");
|
|
20
|
+
const microtime_1 = __importDefault(require("microtime"));
|
|
21
|
+
const error_reponse_1 = require("../../core/functions/error-reponse");
|
|
22
|
+
const global_function_1 = require("../../core/functions/global-function");
|
|
23
|
+
let AicfEndpointService = class AicfEndpointService {
|
|
24
|
+
constructor(logger, contextService) {
|
|
25
|
+
this.logger = logger;
|
|
26
|
+
this.contextService = contextService;
|
|
27
|
+
}
|
|
28
|
+
modHeaderAicf(headers, subSessionId) {
|
|
29
|
+
const transactionRefInfo = (0, global_function_1.GetTransactionReference)();
|
|
30
|
+
headers['x-origin-session'] =
|
|
31
|
+
`${transactionRefInfo.sessionId}|${subSessionId}`;
|
|
32
|
+
headers['x-ais-orderref'] = transactionRefInfo.transactionId;
|
|
33
|
+
return headers;
|
|
34
|
+
}
|
|
35
|
+
requestLog(request, subSessionId, externalInfo) {
|
|
36
|
+
const requestFormat = (0, aicf_dto_1.MapRequestFormat)(request);
|
|
37
|
+
try {
|
|
38
|
+
const endpointInfo = {
|
|
39
|
+
request: requestFormat,
|
|
40
|
+
dependency: externalInfo.dependency,
|
|
41
|
+
subSessionId: subSessionId,
|
|
42
|
+
startTime: microtime_1.default.now(),
|
|
43
|
+
};
|
|
44
|
+
this.contextService.set(request.headers['x-origin-session'], endpointInfo);
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
console.log(e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
responseLog(response) {
|
|
51
|
+
try {
|
|
52
|
+
const transactionRefInfo = (0, global_function_1.GetTransactionReference)();
|
|
53
|
+
const endTime = microtime_1.default.now();
|
|
54
|
+
const config = response.config.headers;
|
|
55
|
+
const sessionId = transactionRefInfo.sessionId;
|
|
56
|
+
const endpointInfo = this.contextService.get(config['x-origin-session']);
|
|
57
|
+
const responseFormat = (0, aicf_dto_1.MapResponseFormat)(response);
|
|
58
|
+
(0, global_function_1.SetIsUsedExternalInfo)(() => {
|
|
59
|
+
this.logger.log(new aicf_dto_1.CAICFDetailEndpoint({
|
|
60
|
+
dependency: endpointInfo.dependency,
|
|
61
|
+
subSessionId: endpointInfo.subSessionId,
|
|
62
|
+
resultCode: response.status.toString(),
|
|
63
|
+
resultMessage: response.statusText,
|
|
64
|
+
action: aicf_dto_1.ACTION_TYPE.HTTP,
|
|
65
|
+
endTime: endTime,
|
|
66
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
67
|
+
request: endpointInfo.request,
|
|
68
|
+
response: responseFormat,
|
|
69
|
+
startTime: endpointInfo.startTime,
|
|
70
|
+
sessionId: sessionId,
|
|
71
|
+
recordName: transactionRefInfo.recordName,
|
|
72
|
+
subAction: endpointInfo.request.method,
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
console.log(e);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
responseLogError(error) {
|
|
81
|
+
const transactionRefInfo = (0, global_function_1.GetTransactionReference)();
|
|
82
|
+
const endTime = microtime_1.default.now();
|
|
83
|
+
const config = error.config.headers;
|
|
84
|
+
const sessionId = transactionRefInfo.sessionId;
|
|
85
|
+
const endpointInfo = this.contextService.get(config['x-origin-session']);
|
|
86
|
+
const errorFormat = (0, error_reponse_1.mapErrorResponseWithErrorCode)(error.code);
|
|
87
|
+
const responseError = {
|
|
88
|
+
status: errorFormat.httpCode,
|
|
89
|
+
headers: error.config.headers,
|
|
90
|
+
data: {
|
|
91
|
+
resultCode: errorFormat.resultCode,
|
|
92
|
+
resultMessage: errorFormat.resultDescription,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
const responseFormat = (0, aicf_dto_1.MapResponseFormat)(responseError);
|
|
96
|
+
this.logger.log(new aicf_dto_1.CAICFDetailEndpoint({
|
|
97
|
+
dependency: endpointInfo.dependency,
|
|
98
|
+
subSessionId: endpointInfo.subSessionId,
|
|
99
|
+
action: aicf_dto_1.ACTION_TYPE.HTTP,
|
|
100
|
+
endTime: endTime,
|
|
101
|
+
logLevel: aicf_dto_1.LOG_LEVEL.INFO,
|
|
102
|
+
request: endpointInfo.request,
|
|
103
|
+
response: responseFormat,
|
|
104
|
+
startTime: endpointInfo.startTime,
|
|
105
|
+
sessionId: sessionId,
|
|
106
|
+
recordName: transactionRefInfo.recordName,
|
|
107
|
+
subAction: endpointInfo.request.method,
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
exports.AicfEndpointService = AicfEndpointService;
|
|
112
|
+
exports.AicfEndpointService = AicfEndpointService = __decorate([
|
|
113
|
+
(0, common_1.Injectable)(),
|
|
114
|
+
__metadata("design:paramtypes", [logger_service_1.CustomLoggerService,
|
|
115
|
+
context_service_1.ContextService])
|
|
116
|
+
], AicfEndpointService);
|
|
117
|
+
//# sourceMappingURL=aicf-endpoint.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aicf-endpoint.service.js","sourceRoot":"","sources":["../../../../src/logger/aicf/services/aicf-endpoint.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yDAA2D;AAC3D,oFAAgF;AAChF,+CAO0B;AAC1B,0DAAkC;AAElC,sEAAmF;AACnF,0EAI8C;AAGvC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,MAA2B,EAC3B,cAA8B;QAD9B,WAAM,GAAN,MAAM,CAAqB;QAC3B,mBAAc,GAAd,cAAc,CAAgB;IAC9C,CAAC;IAEJ,aAAa,CAAC,OAAY,EAAE,YAAoB;QAC9C,MAAM,kBAAkB,GAAG,IAAA,yCAAuB,GAAE,CAAC;QACrD,OAAO,CAAC,kBAAkB,CAAC;YACzB,GAAG,kBAAkB,CAAC,SAAS,IAAI,YAAY,EAAE,CAAC;QACpD,OAAO,CAAC,gBAAgB,CAAC,GAAG,kBAAkB,CAAC,aAAa,CAAC;QAC7D,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,UAAU,CACR,OAAY,EACZ,YAAoB,EACpB,YAAqC;QAErC,MAAM,aAAa,GAAG,IAAA,2BAAgB,EAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC;YACH,MAAM,YAAY,GAAiB;gBACjC,OAAO,EAAE,aAAa;gBACtB,UAAU,EAAE,YAAY,CAAC,UAAU;gBACnC,YAAY,EAAE,YAAY;gBAC1B,SAAS,EAAE,mBAAS,CAAC,GAAG,EAAE;aAC3B,CAAC;YACF,IAAI,CAAC,cAA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C,UAAU;YACzC,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM;SACvC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAA;AA1GY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAGgB,oCAAmB;QACX,gCAAc;GAHtC,mBAAmB,CA0G/B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=cloudron.decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudron.decorators.js","sourceRoot":"","sources":["../../../../src/logger/cloudron/decorators/cloudron.decorators.ts"],"names":[],"mappings":""}
|