@yolo-croket-dev/core 1.4.52-jun.2 → 1.4.52-jun.4
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.
|
@@ -68,6 +68,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
68
68
|
return data;
|
|
69
69
|
}
|
|
70
70
|
intercept(context, next) {
|
|
71
|
+
var _a;
|
|
71
72
|
const now = Date.now();
|
|
72
73
|
const args = context.getArgs();
|
|
73
74
|
const rmq = args[1];
|
|
@@ -77,9 +78,7 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
77
78
|
// const now = Date.now();
|
|
78
79
|
const content = JSON.parse(message.content.toString());
|
|
79
80
|
const traceId = content.data.param ? content.data.param.traceId : '-';
|
|
80
|
-
|
|
81
|
-
console.log('intercept 시작 message', message);
|
|
82
|
-
console.log('intercept 시작 content', content);
|
|
81
|
+
const from = ((_a = content.data.param) === null || _a === void 0 ? void 0 : _a.from) || '-';
|
|
83
82
|
msaLogger.printInputInterceptorService({
|
|
84
83
|
traceId,
|
|
85
84
|
messageBrokerInfo: {
|
|
@@ -87,6 +86,9 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
87
86
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
88
87
|
},
|
|
89
88
|
paramInfo: request.param,
|
|
89
|
+
traceInfo: {
|
|
90
|
+
from,
|
|
91
|
+
}
|
|
90
92
|
});
|
|
91
93
|
return next.handle()
|
|
92
94
|
.pipe((0, operators_1.tap)(() => {
|
|
@@ -97,6 +99,13 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
97
99
|
status: 200,
|
|
98
100
|
ms: elapsed,
|
|
99
101
|
},
|
|
102
|
+
messageBrokerInfo: {
|
|
103
|
+
messagePatten: content.pattern,
|
|
104
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
105
|
+
},
|
|
106
|
+
traceInfo: {
|
|
107
|
+
from,
|
|
108
|
+
}
|
|
100
109
|
});
|
|
101
110
|
})).pipe((0, operators_1.catchError)((error) => {
|
|
102
111
|
msaLogger.printExceptionFliterService({
|
|
@@ -107,6 +116,13 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
107
116
|
message: error.subMessage,
|
|
108
117
|
stack: error.stack,
|
|
109
118
|
},
|
|
119
|
+
messageBrokerInfo: {
|
|
120
|
+
messagePatten: content.pattern,
|
|
121
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
122
|
+
},
|
|
123
|
+
traceInfo: {
|
|
124
|
+
from,
|
|
125
|
+
}
|
|
110
126
|
});
|
|
111
127
|
const elapsed = Date.now() - now;
|
|
112
128
|
msaLogger.printOutService({
|
|
@@ -115,6 +131,13 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
115
131
|
status: error.status,
|
|
116
132
|
ms: elapsed,
|
|
117
133
|
},
|
|
134
|
+
messageBrokerInfo: {
|
|
135
|
+
messagePatten: content.pattern,
|
|
136
|
+
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
137
|
+
},
|
|
138
|
+
traceInfo: {
|
|
139
|
+
from,
|
|
140
|
+
}
|
|
118
141
|
});
|
|
119
142
|
throw error;
|
|
120
143
|
}));
|