-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
feat: implement custom logger #2521
Conversation
@stingalleman Can you explain a bit more about why you want this feature? We would like to keep our config interface as minimal as possible, and from our team aspect, we didn't yet see many use cases of providing custom logger here. Thanks. |
@antfu We run our developer environment in Docker, and the problem is that all the logs are shown at once, and it's just a nice visual addition if Vite uses the same format as the other loggers, which are all the same. |
This PR implements a way to use your own logger.
You just need to make a class that implements the already exported class
Logger
and inject it in the config.A really quick and ugly example:
will result in: