xcally-nest-library 0.0.36 → 0.0.37
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/package.json
CHANGED
@@ -22,9 +22,9 @@ export class LoggerService {
|
|
22
22
|
) {}
|
23
23
|
|
24
24
|
private withAdditionalTraceId(meta?: LoggerMeta) {
|
25
|
-
const
|
26
|
-
const
|
27
|
-
return { ...meta,
|
25
|
+
const xcTraceId: string | undefined = this.cls.get('xcTraceId');
|
26
|
+
const xcActionId: string | undefined = this.cls.get('xcActionId');
|
27
|
+
return { ...meta, xcTraceId: xcTraceId ?? meta.xcTraceId, xcActionId: xcActionId ?? meta.xcActionId };
|
28
28
|
}
|
29
29
|
|
30
30
|
debug(msg: string, meta?: LoggerMeta): void {
|
@@ -60,7 +60,7 @@ export class LoggerService {
|
|
60
60
|
// Esempio di uso corretto:
|
61
61
|
someMethod() {
|
62
62
|
this.cls.run(() => {
|
63
|
-
this.cls.set('
|
63
|
+
this.cls.set('xcTraceId', 'my-trace-id');
|
64
64
|
// Tutto il codice asincrono che parte da qui vedrà il valore
|
65
65
|
this.logger.info('Log con trace id'); // Qui funziona
|
66
66
|
setTimeout(() => {
|