Sha256: 4c4a356f6ad5ed1a6658d00cc7fd8e0c3665377cf2245e8793625e87b3b00fdf
Contents?: true
Size: 779 Bytes
Versions: 17
Compression:
Stored size: 779 Bytes
Contents
"use strict"; var levels = require('../levels') , log4js = require('../log4js'); function logLevelFilter (minLevelString, maxLevelString, appender) { var minLevel = levels.toLevel(minLevelString); var maxLevel = levels.toLevel(maxLevelString, levels.FATAL); return function(logEvent) { var eventLevel = logEvent.level; if (eventLevel.isGreaterThanOrEqualTo(minLevel) && eventLevel.isLessThanOrEqualTo(maxLevel)) { appender(logEvent); } }; } function configure(config, options) { log4js.loadAppender(config.appender.type); var appender = log4js.appenderMakers[config.appender.type](config.appender, options); return logLevelFilter(config.level, config.maxLevel, appender); } exports.appender = logLevelFilter; exports.configure = configure;
Version data entries
17 entries across 17 versions & 2 rubygems