triggerdotdev / trigger.dev

Trigger.dev is the open source background jobs platform.
https://trigger.dev/changelog
Apache License 2.0
8.62k stars 524 forks source link

[TRI-3566] Logging strips out key/value pairs when the value is `0` #1289

Open matt-aitken opened 1 week ago

matt-aitken commented 1 week ago

If you do this:

logger.log("Some text", { foo: "bar", val: 0 });

The properties that are stored are just:

{ "foo": "bar" }

It should include "val": 0 as well. This is most likely a bug when we flatten the attributes into a flat structure. A classic falsy check bug is my guess.

TRI-3566

abhi12299 commented 1 week ago

@matt-aitken how do i reproduce the issue? this is working fine: image

image