Re:Show HN: Universal Logger for Node, Deno, Bun, Browser
by ericyd on Tuesday September 17, 2024 @12:30PM
(#41569450)
That makes sense! This is obviously just my preference, but in both cases I would prefer this to be a config option, so I could control it e.g. by an environment variable. Local dev? Probably don't care about timestamps and probably would enjoy emojis. Production? Absolutely need timestamps and probably don't want emojis. I realize this is a significant API change, but just wanted to share my thoughts.
[ Parent
| on HN ]
Re:Show HN: Universal Logger for Node, Deno, Bun, Browser
by ajstacy06 on Tuesday September 17, 2024 @03:57PM
(#41571987)
It is actually also a config option that can be passed to the setup function. Many of the modifiers actually just change the config value under the hood. All production formatters have timestamps by default, only pretty does not so it shouldn't be anything you need to worry about. You can also set timestamps globally in the setup function.
https://adzejs.com/getting-started/setup.html
https://adzejs.com/reference/configuration.html#user-configu...