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.
19 lines
425 B
19 lines
425 B
'use strict';
|
|
|
|
var noop = function() {};
|
|
var cl = function() {
|
|
console.log(arguments);
|
|
};
|
|
|
|
var loggers = {
|
|
none: {info: noop, warn: noop, err: noop, debug: noop},
|
|
normal: {info: cl, warn: cl, err: cl, debug: noop},
|
|
debug: {info: cl, warn: cl, err: cl, debug: cl},
|
|
};
|
|
|
|
var config = require('../config');
|
|
if(config.log) {
|
|
module.exports = config.log;
|
|
} else {
|
|
module.exports = loggers[config.logger || 'normal'];
|
|
}
|
|
|