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.
24 lines
365 B
24 lines
365 B
'use strict';
|
|
|
|
const log = require('webpack-log');
|
|
|
|
function createLogger(options = {}) {
|
|
let level = options.logLevel || 'info';
|
|
|
|
if (options.noInfo === true) {
|
|
level = 'warn';
|
|
}
|
|
|
|
if (options.quiet === true) {
|
|
level = 'silent';
|
|
}
|
|
|
|
return log({
|
|
name: 'wds',
|
|
level,
|
|
timestamp: options.logTime,
|
|
});
|
|
}
|
|
|
|
module.exports = createLogger;
|