Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(){
if(hasGulplog()){
// specifically deferring loading here to keep from registering it globally
var gulplog = require('gulplog');
gulplog.info.apply(gulplog, arguments);
} else {
// specifically defering loading because it might not be used
var fancylog = require('fancy-log');
fancylog.apply(null, arguments);
}
return this;
};
module.exports = function(){
if(hasGulplog()){
// specifically deferring loading here to keep from registering it globally
var gulplog = require('gulplog');
gulplog.info.apply(gulplog, arguments);
} else {
// specifically defering loading because it might not be used
var fancylog = require('fancy-log');
fancylog.apply(null, arguments);
}
return this;
};
module.exports = function(){
if(hasGulplog()){
// specifically deferring loading here to keep from registering it globally
var gulplog = require('gulplog');
gulplog.info.apply(gulplog, arguments);
} else {
// specifically defering loading because it might not be used
var fancylog = require('fancy-log');
fancylog.apply(null, arguments);
}
return this;
};
module.exports = function(){
if(hasGulplog()){
// specifically deferring loading here to keep from registering it globally
var gulplog = require('gulplog');
gulplog.info.apply(gulplog, arguments);
} else {
// specifically defering loading because it might not be used
var fancylog = require('fancy-log');
fancylog.apply(null, arguments);
}
return this;
};
function logger() {
if (hasGulplog()) {
// specifically deferring loading here to keep from registering it globally
const gulplog = require('gulplog');
gulplog.info.apply(gulplog, arguments);
} else {
// specifically deferring loading because it might not be used
const fancylog = require('fancy-log');
fancylog.apply(null, arguments);
}
}
function debug() {
var data = Array.prototype.slice.call(arguments);
fancyLog.apply(false, data);
}
case 'slient':
if (level !== 'lv1') {
output = false;
}
break;
case 'info':
if (level === 'lv3') {
output = false;
}
break;
default:
output = true;
}
if (output) {
var data = Array.prototype.slice.call(content);
fancyLog.apply(false, data);
}
}
function log(...message) {
fancyLog.apply(false, message);
}