You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem
@swup/debug-plugin has a few limitations that are hard to change without breaking changes, the biggest being that it expexts a fixed amount of arguments (message and object).
I'd like to introduce a new global logging mechanism into Swup, that consumers and plugins could make use of out of the box. I'd propose consola as the logging library.
The consumer imports the logger instance as a named import and injects it into swup:
Could there be some way of sticking with the debug plugin? I like the Logger class a bit more, but it'd be nice to have some continuity in how everything in swup is handled with plugins.
The problem
@swup/debug-plugin has a few limitations that are hard to change without breaking changes, the biggest being that it expexts a fixed amount of arguments (message and object).
I'd like to introduce a new global logging mechanism into Swup, that consumers and plugins could make use of out of the box. I'd propose consola as the logging library.
The consumer imports the logger instance as a named import and injects it into swup:
Plugins can now call the logger:
Pros
Limitations
UMD builds would need to use consola directly.
Alternatives considered
Separate logging implementation on the plugin level. Could become cumbersome quickly.
How important is this feature to you?
The text was updated successfully, but these errors were encountered: