Sha256: 68ddc9ef8a853967fba1eea11f66499cfea1157dab4129127ecaaccb2b846fbf
Contents?: true
Size: 558 Bytes
Versions: 17
Compression:
Stored size: 558 Bytes
Contents
"use strict"; var log4js = require('../log4js'); function categoryFilter (excludes, appender) { if (typeof(excludes) === 'string') excludes = [excludes]; return function(logEvent) { if (excludes.indexOf(logEvent.categoryName) === -1) { appender(logEvent); } }; } function configure(config) { log4js.loadAppender(config.appender.type); var appender = log4js.appenderMakers[config.appender.type](config.appender); return categoryFilter(config.exclude, appender); } exports.appender = categoryFilter; exports.configure = configure;
Version data entries
17 entries across 17 versions & 2 rubygems