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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcally-nest-library",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,9 +22,9 @@ export class LoggerService {
22
22
  ) {}
23
23
 
24
24
  private withAdditionalTraceId(meta?: LoggerMeta) {
25
- const xctraceid: string | undefined = this.cls.get('xctraceid');
26
- const xcactionid: string | undefined = this.cls.get('xcactionid');
27
- return { ...meta, xctraceid, xcactionid };
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('xctraceid', 'my-trace-id');
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(() => {