You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
365 B

4 years ago
  1. 'use strict';
  2. const log = require('webpack-log');
  3. function createLogger(options = {}) {
  4. let level = options.logLevel || 'info';
  5. if (options.noInfo === true) {
  6. level = 'warn';
  7. }
  8. if (options.quiet === true) {
  9. level = 'silent';
  10. }
  11. return log({
  12. name: 'wds',
  13. level,
  14. timestamp: options.logTime,
  15. });
  16. }
  17. module.exports = createLogger;