/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['logging/config.js']) {
  _$jscoverage['logging/config.js'] = [];
  _$jscoverage['logging/config.js'][1] = 0;
  _$jscoverage['logging/config.js'][3] = 0;
  _$jscoverage['logging/config.js'][5] = 0;
  _$jscoverage['logging/config.js'][6] = 0;
  _$jscoverage['logging/config.js'][7] = 0;
  _$jscoverage['logging/config.js'][8] = 0;
  _$jscoverage['logging/config.js'][9] = 0;
  _$jscoverage['logging/config.js'][10] = 0;
  _$jscoverage['logging/config.js'][11] = 0;
  _$jscoverage['logging/config.js'][12] = 0;
  _$jscoverage['logging/config.js'][15] = 0;
  _$jscoverage['logging/config.js'][16] = 0;
  _$jscoverage['logging/config.js'][17] = 0;
  _$jscoverage['logging/config.js'][18] = 0;
  _$jscoverage['logging/config.js'][19] = 0;
  _$jscoverage['logging/config.js'][20] = 0;
  _$jscoverage['logging/config.js'][21] = 0;
  _$jscoverage['logging/config.js'][23] = 0;
  _$jscoverage['logging/config.js'][24] = 0;
  _$jscoverage['logging/config.js'][26] = 0;
  _$jscoverage['logging/config.js'][27] = 0;
  _$jscoverage['logging/config.js'][29] = 0;
  _$jscoverage['logging/config.js'][30] = 0;
  _$jscoverage['logging/config.js'][32] = 0;
  _$jscoverage['logging/config.js'][33] = 0;
  _$jscoverage['logging/config.js'][35] = 0;
  _$jscoverage['logging/config.js'][36] = 0;
  _$jscoverage['logging/config.js'][51] = 0;
  _$jscoverage['logging/config.js'][56] = 0;
  _$jscoverage['logging/config.js'][57] = 0;
  _$jscoverage['logging/config.js'][58] = 0;
  _$jscoverage['logging/config.js'][59] = 0;
  _$jscoverage['logging/config.js'][60] = 0;
  _$jscoverage['logging/config.js'][62] = 0;
  _$jscoverage['logging/config.js'][71] = 0;
  _$jscoverage['logging/config.js'][72] = 0;
  _$jscoverage['logging/config.js'][73] = 0;
  _$jscoverage['logging/config.js'][74] = 0;
  _$jscoverage['logging/config.js'][76] = 0;
  _$jscoverage['logging/config.js'][139] = 0;
  _$jscoverage['logging/config.js'][188] = 0;
  _$jscoverage['logging/config.js'][189] = 0;
  _$jscoverage['logging/config.js'][191] = 0;
  _$jscoverage['logging/config.js'][192] = 0;
  _$jscoverage['logging/config.js'][193] = 0;
  _$jscoverage['logging/config.js'][195] = 0;
  _$jscoverage['logging/config.js'][196] = 0;
  _$jscoverage['logging/config.js'][198] = 0;
}
_$jscoverage['logging/config.js'][1]++;
var define = require("../define.js").define, base = require("../base"), fs = require("fs");
_$jscoverage['logging/config.js'][3]++;
var logging, Logger, Level, appenders;
_$jscoverage['logging/config.js'][5]++;
var parseProperties = (function (properties) {
  _$jscoverage['logging/config.js'][6]++;
  for (var i in properties) {
    _$jscoverage['logging/config.js'][7]++;
    var logger = Logger.getLogger(i);
    _$jscoverage['logging/config.js'][8]++;
    var props = properties[i], level = props.level, appenderArr = props.appenders;
    _$jscoverage['logging/config.js'][9]++;
    if (level) {
      _$jscoverage['logging/config.js'][10]++;
      level = Level.toLevel(level);
      _$jscoverage['logging/config.js'][11]++;
      if (level) {
        _$jscoverage['logging/config.js'][12]++;
        logger.level = level;
      }
    }
    _$jscoverage['logging/config.js'][15]++;
    if (appenderArr && base.isArray(appenderArr)) {
      _$jscoverage['logging/config.js'][16]++;
      for (var j = appenderArr.length - 1; j >= 0; j--) {
        _$jscoverage['logging/config.js'][17]++;
        var appenderProps = appenderArr[j], type = appenderProps.type;
        _$jscoverage['logging/config.js'][18]++;
        appenderProps.type = null;
        _$jscoverage['logging/config.js'][19]++;
        if (type) {
          _$jscoverage['logging/config.js'][20]++;
          var appender;
          _$jscoverage['logging/config.js'][21]++;
          switch (type.toLowerCase()) {
          case "consoleappender":
            _$jscoverage['logging/config.js'][23]++;
            appender = appenders.ConsoleAppender;
            _$jscoverage['logging/config.js'][24]++;
            break;
          case "jsonappender":
            _$jscoverage['logging/config.js'][26]++;
            appender = appenders.JSONAppender;
            _$jscoverage['logging/config.js'][27]++;
            break;
          case "fileappender":
            _$jscoverage['logging/config.js'][29]++;
            appender = appenders.FileAppender;
            _$jscoverage['logging/config.js'][30]++;
            break;
          case "rollingfileappender":
            _$jscoverage['logging/config.js'][32]++;
            appender = appenders.RollingFileAppender;
            _$jscoverage['logging/config.js'][33]++;
            break;
          }
          _$jscoverage['logging/config.js'][35]++;
          if (appender) {
            _$jscoverage['logging/config.js'][36]++;
            logger.addAppender(new appender(appenderProps));
          }
        }
}
    }
}
});
_$jscoverage['logging/config.js'][51]++;
var BasicConfigurator = (exports.BasicConfigurator = define(null, {instance: {constructor: (function () {
  _$jscoverage['logging/config.js'][56]++;
  if (! Logger) {
    _$jscoverage['logging/config.js'][57]++;
    logging = require("./index").logging;
    _$jscoverage['logging/config.js'][58]++;
    Logger = logging.Logger;
    _$jscoverage['logging/config.js'][59]++;
    Level = logging.Level;
    _$jscoverage['logging/config.js'][60]++;
    appenders = logging.appenders;
  }
  _$jscoverage['logging/config.js'][62]++;
  this.__configured = false;
}), configure: (function (appender) {
  _$jscoverage['logging/config.js'][71]++;
  var rootLogger = Logger.getRootLogger();
  _$jscoverage['logging/config.js'][72]++;
  if (! appender || ! (appender instanceof appenders.Appender) && ! this.__configured) {
    _$jscoverage['logging/config.js'][73]++;
    rootLogger.addAppender(new appenders.ConsoleAppender());
    _$jscoverage['logging/config.js'][74]++;
    this.__configured = true;
  }
  else {
    _$jscoverage['logging/config.js'][76]++;
    rootLogger.addAppender(appender);
  }
})}}));
_$jscoverage['logging/config.js'][139]++;
exports.PropertyConfigurator = define(BasicConfigurator, {instance: {configure: (function (properties) {
  _$jscoverage['logging/config.js'][188]++;
  if (base.isObject(properties)) {
    _$jscoverage['logging/config.js'][189]++;
    parseProperties(properties);
  }
  else {
    _$jscoverage['logging/config.js'][191]++;
    fs.readFile(properties, (function (err, res) {
  _$jscoverage['logging/config.js'][192]++;
  if (err) {
    _$jscoverage['logging/config.js'][193]++;
    throw err;
  }
  else {
    _$jscoverage['logging/config.js'][195]++;
    try {
      _$jscoverage['logging/config.js'][196]++;
      parseProperties(JSON.parse(res));
    }
    catch (e) {
      _$jscoverage['logging/config.js'][198]++;
      throw e;
    }
  }
}));
  }
})}});
_$jscoverage['logging/config.js'].source = ["var define = require(\"../define.js\").define, base = require(\"../base\"), fs = require('fs');","","var logging, Logger, Level, appenders;","","var parseProperties = function(properties) {","\tfor (var i in properties) {","\t\tvar logger = Logger.getLogger(i);","\t\tvar props = properties[i], level = props.level, appenderArr = props.appenders;","\t\tif (level) {","\t\t\tlevel = Level.toLevel(level);","\t\t\tif (level) {","\t\t\t\tlogger.level = level;","\t\t\t}","\t\t}","\t\tif (appenderArr &amp;&amp; base.isArray(appenderArr)) {","\t\t\tfor (var j = appenderArr.length - 1; j &gt;= 0; j--) {","\t\t\t\tvar appenderProps = appenderArr[j], type = appenderProps.type;","\t\t\t\tappenderProps.type = null;","\t\t\t\tif (type) {","\t\t\t\t\tvar appender;","\t\t\t\t\tswitch (type.toLowerCase()) {","\t\t\t\t\t\tcase \"consoleappender\":","\t\t\t\t\t\t\tappender = appenders.ConsoleAppender;","\t\t\t\t\t\t\tbreak;","\t\t\t\t\t\tcase \"jsonappender\":","\t\t\t\t\t\t\tappender = appenders.JSONAppender;","\t\t\t\t\t\t\tbreak;","\t\t\t\t\t\tcase \"fileappender\":","\t\t\t\t\t\t\tappender = appenders.FileAppender;","\t\t\t\t\t\t\tbreak;","\t\t\t\t\t\tcase \"rollingfileappender\":","\t\t\t\t\t\t\tappender = appenders.RollingFileAppender;","\t\t\t\t\t\t\tbreak;","\t\t\t\t\t}","\t\t\t\t\tif (appender) {","\t\t\t\t\t\tlogger.addAppender(new appender(appenderProps));","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t}","\t}","};","","/**"," * @class default configurator for logging"," *"," * @name BasicConfigurator"," * @memberOf comb.logging"," *"," */","var BasicConfigurator = (exports.BasicConfigurator = define(null, {","\t\t\tinstance : {","\t\t\t\t/**@lends comb.logging.BasicConfigurator.prototype*/","","\t\t\t\tconstructor : function() {","\t\t\t\t\tif (!Logger) {","\t\t\t\t\t\tlogging = require(\"./index\").logging;","\t\t\t\t\t\tLogger = logging.Logger;","\t\t\t\t\t\tLevel = logging.Level;","\t\t\t\t\t\tappenders = logging.appenders;","\t\t\t\t\t}","\t\t\t\t\tthis.__configured = false;","\t\t\t\t},","","\t\t\t\t/**","\t\t\t\t * Configure logging.","\t\t\t\t *","\t\t\t\t * @param {comb.logging.Appender} [appender=null] appender to add to the root logger, by default a console logger is added.","\t\t\t\t */","\t\t\t\tconfigure : function(appender) {","\t\t\t\t\tvar rootLogger = Logger.getRootLogger();","\t\t\t\t\tif (!appender || !(appender instanceof appenders.Appender) &amp;&amp; !this.__configured) {","\t\t\t\t\t\trootLogger.addAppender(new appenders.ConsoleAppender());","\t\t\t\t\t\tthis.__configured = true;","\t\t\t\t\t} else {","\t\t\t\t\t\trootLogger.addAppender(appender);","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t}));","","/**"," * @class Configures comb.Logger with the properties or properties contained within a file"," *"," * @example"," *"," * var propertyConfigurator = new comb.logging.PropertyConfigurator();"," *"," * propertyConfigurator.configure(\"/location/of/combLogger.json\");"," *"," * //or"," *"," * var config = {"," *     \"my.logger\" : {"," *         level : \"INFO\","," *         appenders : ["," *             {"," *                 //default file appender"," *                 type : \"FileAppender\","," *                 file : \"/var/log/myApp.log\","," *             },"," *             {"," *                 //default JSON appender"," *                 type : \"JSONAppender\","," *                 file : \"/var/log/myApp.JSON\","," *             },"," *             {"," *                 type : \"FileAppender\","," *                  //override default patter"," *                 pattern : \"{[EEEE, MMMM dd, yyyy h:m a]timeStamp} {[5]level}\""," *                          + \" {[- 5]levelName} {[-20]name} : {message}\","," *                 //location of my log file"," *                 file : \"/var/log/myApp-errors.log\","," *                 //override name so it will get added to the log"," *                 name : \"errorFileAppender\","," *                 //overwrite each time"," *                 overwrite : true,"," *                 //explicity set the appender to only accept errors"," *                 level : \"ERROR\""," *             },"," *             {"," *                 type : \"JSONAppender\","," *                 file : \"/var/log/myApp-error.json\","," *                 //explicity set the appender to only accept errors"," *                 level : \"ERROR\""," *             }"," *         ]"," *     }"," *     //repeat for more loggers"," *"," *     propertyConfigurator.configure(config);"," * }"," *"," * @name PropertyConfigurator"," * @augments comb.logging.BasicConfigurator"," * @memberOf comb.logging"," *"," */","exports.PropertyConfigurator = define(BasicConfigurator, {","\t\t\tinstance : {","\t\t\t   /**@lends comb.logging.PropertyConfigurator.prototype*/","\t\t\t\t/**","\t\t\t\t * Call to configure logging","\t\t\t\t *","\t\t\t\t * @example","\t\t\t\t *","\t\t\t\t * //Example configuration","\t\t\t\t *  {","\t\t\t\t *     \"my.logger\" : {","\t\t\t\t *         level : \"INFO\",","\t\t\t\t *         appenders : [","\t\t\t\t *             {","\t\t\t\t *                 //default file appender","\t\t\t\t *                 type : \"FileAppender\",","\t\t\t\t *                 file : \"/var/log/myApp.log\",","\t\t\t\t *             },","\t\t\t\t *             {","\t\t\t\t *                 //default JSON appender","\t\t\t\t *                 type : \"JSONAppender\",","\t\t\t\t *                 file : \"/var/log/myApp.JSON\",","\t\t\t\t *             },","\t\t\t\t *             {","\t\t\t\t *                 type : \"FileAppender\",","\t\t\t\t *                  //override default patter","\t\t\t\t *                 pattern : \"{[EEEE, MMMM dd, yyyy h:m a]timeStamp} {[5]level}\"","\t\t\t\t *                          + \" {[- 5]levelName} {[-20]name} : {message}\",","\t\t\t\t *                 //location of my log file","\t\t\t\t *                 file : \"/var/log/myApp-errors.log\",","\t\t\t\t *                 //override name so it will get added to the log","\t\t\t\t *                 name : \"errorFileAppender\",","\t\t\t\t *                 //overwrite each time","\t\t\t\t *                 overwrite : true,","\t\t\t\t *                 //explicity set the appender to only accept errors","\t\t\t\t *                 level : \"ERROR\"","\t\t\t\t *             },","\t\t\t\t *             {","\t\t\t\t *                 type : \"JSONAppender\",","\t\t\t\t *                 file : \"/var/log/myApp-error.json\",","\t\t\t\t *                 //explicity set the appender to only accept errors","\t\t\t\t *                 level : \"ERROR\"","\t\t\t\t *             }","\t\t\t\t *         ]","\t\t\t\t *     }","\t\t\t\t *","\t\t\t\t * @param {Object|String} properties Object containing configuration or string containing a file name with the configuration.","\t\t\t\t */","\t\t\t\tconfigure : function(properties) {","\t\t\t\t\tif (base.isObject(properties)) {","\t\t\t\t\t\tparseProperties(properties);","\t\t\t\t\t} else {","\t\t\t\t\t\tfs.readFile(properties, function(err, res) {","\t\t\t\t\t\t\tif (err) {","\t\t\t\t\t\t\t\tthrow err;","\t\t\t\t\t\t\t} else {","\t\t\t\t\t\t\t\ttry {","\t\t\t\t\t\t\t\t\tparseProperties(JSON.parse(res));","\t\t\t\t\t\t\t\t} catch(e) {","\t\t\t\t\t\t\t\t\tthrow e;","\t\t\t\t\t\t\t\t}","\t\t\t\t\t\t\t}","\t\t\t\t\t\t})","\t\t\t\t\t}","\t\t\t\t}","\t\t\t}","\t\t});"];
