draft: refactor project so it sits on top of a standalone app
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
'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;
|
||||
Reference in New Issue
Block a user