-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Bundle logger #733
Labels
Milestone
Comments
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. |
Yea, makes sense to stick to the debug plugin if possible @daun. Anyways, we can put a pin in this for now, no need to introduce this for swup@4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: