1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/lib/logger.js
2020-02-20 08:30:21 +01:00

15 lines
348 B
JavaScript

var log4js = require('log4js');
log4js.clearAppenders();
log4js.addAppender(log4js.appenders.console());
var logger = log4js.getLogger('unleash');
// TODO: make level configurable
if (process.env.NODE_ENV === 'production') {
logger.setLevel(log4js.levels.ERROR);
} else {
logger.setLevel(log4js.levels.DEBUG);
}
module.exports = logger;