log.js 548 B

1234567891011121314151617181920
  1. import logger from "../modules/logger/index.js";
  2. var name = "webpack-dev-server"; // default level is set on the client side, so it does not need
  3. // to be set by the CLI or API
  4. var defaultLevel = "info"; // options new options, merge with old options
  5. /**
  6. * @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level
  7. * @returns {void}
  8. */
  9. function setLogLevel(level) {
  10. logger.configureDefaultLogger({
  11. level: level
  12. });
  13. }
  14. setLogLevel(defaultLevel);
  15. var log = logger.getLogger(name);
  16. export { log, setLogLevel };