mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
24 lines
365 B
JavaScript
24 lines
365 B
JavaScript
'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;
|