-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
As a breaking change, we can simplify the input by splitting the logger option into multiple and dedicated properties:
After writing my comments around a simplification suggestion around the validateLogger function I have determined that we need to re-think how we deal with this issue.
It was a mistake (that I am responsible for) to accept either an object of options or an instance for the logger property. It's a simpler UX, but basically impossible to handle in a concise and maintainable way with the new throwing requirement. I think it is a good idea to introduce the throwing requirement. But I think it means we need to:
- Deprecate support for
{ logger: <logger_instance> }. - Introduce
{ loggerInstance: <logger_instance> }. - If
loggerInstanceis provided, it takes precedence over{ logger: <options> }.
The other avenue is to deprecate { logger: <options> }, but I am quite certain that more people pass in options than they do logger instances. We'd break many more people with this avenue.
Originally posted by @jsumners in #4520 (review)