Chore: again, improve k8s error logging

This commit is contained in:
shamoon
2026-08-21 08:11:48 -07:00
parent cc22d04429
commit fa47a2d86c
2 changed files with 16 additions and 13 deletions
+10
View File
@@ -170,6 +170,16 @@ describe("utils/logger", () => {
});
expect(plainMsg).toBe("[t] info: hello");
const causeMsg = formatter({
timestamp: "t",
level: "error",
label: "x",
stack: "STACK",
message: "fetch failed",
cause: { stack: "CAUSE STACK" },
});
expect(causeMsg).toBe("[t] error: <x> STACK\ncaused by: CAUSE STACK");
const out = splat.transform(
{
message: "Hello %s",