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

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.4.1 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.4.0 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.3.0 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.2.1 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.2.0 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.1.0 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.0.8 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.0.7 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
hooch-0.0.6 jasmine/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js