@adviser/cement 0.2.43 → 0.2.44

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/index.js CHANGED
@@ -1325,7 +1325,14 @@ var LoggerImpl = class _LoggerImpl {
1325
1325
  }
1326
1326
  }
1327
1327
  if (err instanceof Error) {
1328
- this._attributes[key] = logValue(err.message, toLogValueCtx(this.levelHandler));
1328
+ if (err.cause) {
1329
+ this.coerceKey(key, {
1330
+ message: err.message,
1331
+ cause: err.cause
1332
+ });
1333
+ } else {
1334
+ this._attributes[key] = logValue(err.message, toLogValueCtx(this.levelHandler));
1335
+ }
1329
1336
  if (this.levelHandler.isStackExposed) {
1330
1337
  this._attributes["stack"] = logValue(
1331
1338
  (_a = err.stack) == null ? void 0 : _a.split("\n").map((s) => s.trim()),