@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.cjs +8 -1
- package/index.cjs.map +1 -1
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/jsr.json +1 -1
- package/src/logger-impl.ts +8 -1
- package/ts/future.test.js +4 -0
- package/ts/future.test.js.map +1 -1
- package/ts/logger-impl.d.ts.map +1 -1
- package/ts/logger-impl.js +9 -1
- package/ts/logger-impl.js.map +1 -1
- package/ts/logger.test.js +16 -0
- package/ts/logger.test.js.map +1 -1
package/index.js
CHANGED
@@ -1325,7 +1325,14 @@ var LoggerImpl = class _LoggerImpl {
|
|
1325
1325
|
}
|
1326
1326
|
}
|
1327
1327
|
if (err instanceof Error) {
|
1328
|
-
|
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()),
|