podverse-helpers 5.0.5 → 5.0.7

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.
@@ -1,5 +1,5 @@
1
1
  import * as TransportStream from 'winston-transport';
2
2
  export declare const logger: import("winston").Logger;
3
3
  export declare const addRemoteTransport: (transport: TransportStream) => void;
4
- export declare const logError: (error: Error) => void;
4
+ export declare const logError: (message: string, error?: Error) => void;
5
5
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAerD,eAAO,MAAM,MAAM,0BA+BjB,CAAC;AAEH,eAAO,MAAM,kBAAkB,cAAe,eAAe,SAE5D,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,KAAK,SAEpC,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAerD,eAAO,MAAM,MAAM,0BA+BjB,CAAC;AAEH,eAAO,MAAM,kBAAkB,cAAe,eAAe,SAE5D,CAAC;AAEF,eAAO,MAAM,QAAQ,YAAa,MAAM,UAAU,KAAK,SAKtD,CAAC"}
@@ -59,7 +59,10 @@ const addRemoteTransport = (transport) => {
59
59
  exports.logger.add(transport);
60
60
  };
61
61
  exports.addRemoteTransport = addRemoteTransport;
62
- const logError = (error) => {
63
- exports.logger.error(error.message, { stack: error.stack });
62
+ const logError = (message, error) => {
63
+ exports.logger.error(message);
64
+ if (error === null || error === void 0 ? void 0 : error.message) {
65
+ exports.logger.error(error === null || error === void 0 ? void 0 : error.message, { stack: error === null || error === void 0 ? void 0 : error.stack });
66
+ }
64
67
  };
65
68
  exports.logError = logError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podverse-helpers",
3
- "version": "5.0.5",
3
+ "version": "5.0.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",