diff --git a/example/common/utils_log.js b/example/common/utils_log.js index bbeb34c1..5eff58ff 100755 --- a/example/common/utils_log.js +++ b/example/common/utils_log.js @@ -4,22 +4,25 @@ var log4js = require('log4js') // var path = require('path') function getLogger (category, level) { - var log if (level == null) { level = 'INFO' } log4js.configure({ - appenders: [ - { + appenders: { + console: { type: 'console' } - ] + }, + categories: { + default: { + appenders: ['console'], + level + } + } }) - log = log4js.getLogger(category) - log.setLevel(level) - return log + return log4js.getLogger(category) } function Log (filename, level) {