Feature request: widen types for Logger arguments #1777
Labels
discussing
The issue needs to be discussed, elaborated, or refined
feature-request
This item refers to a feature request for an existing or new utility
logger
This item relates to the Logger Utility
need-customer-feedback
Requires more customers feedback before making or revisiting a decision
revisit-in-3-months
Blocked issues/PRs that need to be revisited
Use case
The current implementation of our Logger is fairly stringent when it comes to types and objects allowed in the logs when compared with the Python implementation.
For instance, in Python it’s possible to log a wide number of objects:
which produce the following logs:
On TypeScript instead, the current typing allows the first argument to only be a string, and the second a limited amount of types (mainly strings, objects, and errors).
A condensed version of the current types, and its limitation can be found in this TS Playground.
We should aim at expanding the type of arguments of the logger to more closely align with the Python counterpart.
Solution/User Experience
You can find the proposed types in this other TS playground, but essentially after the changes, it should be possible to log all the following:
Alternative solutions
No response
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: