@yolo-croket-dev/core 1.5.2 → 1.6.0
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.
|
@@ -74,29 +74,31 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
74
74
|
// const args = context.getArgs();
|
|
75
75
|
const rmqContext = context.switchToRpc().getContext();
|
|
76
76
|
const data = context.switchToRpc().getData();
|
|
77
|
-
const
|
|
78
|
-
const
|
|
77
|
+
const pastFrom = data.param.from ? JSON.parse(JSON.stringify(data.param.from)) : '-';
|
|
78
|
+
const pastFroms = data.param.froms ? JSON.parse(JSON.stringify(data.param.froms)) : [pastFrom];
|
|
79
79
|
const originalMessage = rmqContext.getMessage();
|
|
80
80
|
const ctx = context.switchToHttp();
|
|
81
81
|
const request = ctx.getRequest();
|
|
82
|
+
const pastParam = request.param;
|
|
82
83
|
const originalcontent = originalMessage.content;
|
|
83
84
|
const content = JSON.parse(originalcontent.toString());
|
|
84
85
|
const traceId = content.data.param ? content.data.param.traceId : '-';
|
|
85
86
|
/** from 변경 */
|
|
86
87
|
const tmpFrom = `${SERVER_NAME}: ${content.pattern}`;
|
|
87
88
|
data.param.from = tmpFrom;
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
const tmpFroms = JSON.parse(JSON.stringify(pastFroms));
|
|
90
|
+
tmpFroms.push(tmpFrom);
|
|
91
|
+
data.param.froms = tmpFroms;
|
|
90
92
|
msaLogger.printInputInterceptorService({
|
|
91
93
|
traceId,
|
|
92
94
|
messageBrokerInfo: {
|
|
93
95
|
messagePatten: content.pattern,
|
|
94
96
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
95
97
|
},
|
|
96
|
-
paramInfo:
|
|
98
|
+
paramInfo: pastParam,
|
|
97
99
|
traceInfo: {
|
|
98
|
-
from,
|
|
99
|
-
froms,
|
|
100
|
+
from: pastFrom,
|
|
101
|
+
froms: pastFroms,
|
|
100
102
|
},
|
|
101
103
|
});
|
|
102
104
|
return next.handle()
|
|
@@ -113,8 +115,8 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
113
115
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
114
116
|
},
|
|
115
117
|
traceInfo: {
|
|
116
|
-
from,
|
|
117
|
-
froms,
|
|
118
|
+
from: pastFrom,
|
|
119
|
+
froms: pastFroms,
|
|
118
120
|
},
|
|
119
121
|
});
|
|
120
122
|
})).pipe((0, operators_1.catchError)((error) => {
|
|
@@ -131,8 +133,8 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
131
133
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
132
134
|
},
|
|
133
135
|
traceInfo: {
|
|
134
|
-
from,
|
|
135
|
-
froms,
|
|
136
|
+
from: pastFrom,
|
|
137
|
+
froms: pastFroms,
|
|
136
138
|
},
|
|
137
139
|
});
|
|
138
140
|
const elapsed = Date.now() - now;
|
|
@@ -147,8 +149,8 @@ let LoggingServiceInterceptor = class LoggingServiceInterceptor {
|
|
|
147
149
|
payload: JSON.stringify(this.keyCutter(JSON.stringify(request.payload))),
|
|
148
150
|
},
|
|
149
151
|
traceInfo: {
|
|
150
|
-
from,
|
|
151
|
-
froms,
|
|
152
|
+
from: pastFrom,
|
|
153
|
+
froms: pastFroms,
|
|
152
154
|
},
|
|
153
155
|
});
|
|
154
156
|
throw error;
|