enjoycoding / vite-plugin-mock-server

A mock server plugin for Vite.
MIT License
58 stars 13 forks source link

Respect configured log level for startup message #34

Closed WasabiThumb closed 2 months ago

WasabiThumb commented 2 months ago

Quick patch that disables the "mock server started" message if logLevel is not set to "info". Feel free to disagree with the implementation, though there should be some option to disable the message. The message could also be more congruent with the Vite logger, but I haven't looked into Vite internals at all and don't know how easy that is.

Thanks for this neat package! Saved me a lot of time ;)

octoape commented 2 months ago

Changing the current default behavior is not a good idea. I added the printStartupLog parameter in version 1.3.0, which you can set to false to disable printing the startup log.