@riocrypto/common-server 1.0.1912 → 1.0.1913

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.
@@ -75,12 +75,17 @@ class LoggerService {
75
75
  });
76
76
  this.requestMethodFilter = (0, winston_1.format)((info) => {
77
77
  const allowedMethods = ["POST", "PATCH", "DELETE"];
78
- if (info.meta &&
79
- info.meta.req &&
80
- allowedMethods.includes(info.meta.req.method)) {
81
- return info;
78
+ // Only apply filter if req.method is defined
79
+ if (info.meta && info.meta.req && info.meta.req.method) {
80
+ if (allowedMethods.includes(info.meta.req.method)) {
81
+ return info;
82
+ }
83
+ else {
84
+ return false; // Filter out logs for other methods
85
+ }
82
86
  }
83
- return false; // Filter out logs for other methods
87
+ // If there's no req.method, don't filter out the log
88
+ return info;
84
89
  });
85
90
  this.logger = null;
86
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1912",
3
+ "version": "1.0.1913",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",