lib/logger.js
function(className, options) {
  if (!(this instanceof Logger)) return new Logger(className, options);
  options = options || {};

  // Current reference
  this.className = className;

  // Current logger
  if (currentLogger == null && options.logger) {
    currentLogger = options.logger;
  } else if (currentLogger == null) {
    currentLogger = console.log;
  }

  // Set level of logging, default is error
  if (level == null) {
    level = options.loggerLevel || 'error';
  }

  // Add all class names
  if (filteredClasses[this.className] == null) classFilters[this.className] = true;
}
function(className, options) {
  if (!(this instanceof Logger)) return new Logger(className, options);
  options = options || {};

  // Current reference
  this.className = className;

  // Current logger
  if (currentLogger == null && options.logger) {
    currentLogger = options.logger;
  } else if (currentLogger == null) {
    currentLogger = console.log;
  }

  // Set level of logging, default is error
  if (level == null) {
    level = options.loggerLevel || 'error';
  }

  // Add all class names
  if (filteredClasses[this.className] == null) classFilters[this.className] = true;
}
function ( className , options ) { if ( ! ( this instanceof Logger ) ) return new Logger ( className , options ) ; options = options || { } ; // Current reference this . className = className ; // Current logger if ( currentLogger == null && options . logger ) { currentLogger = options . logger ; } else if ( currentLogger == null ) { currentLogger = console . log ; } // Set level of logging, default is error if ( level == null ) { level = options . loggerLevel || 'error' ; } // Add all class names if ( filteredClasses [ this . className ] == null ) classFilters [ this . className ] = true ; }
Creates a new Logger instance
@class
@param {string} className The Class name associated with the logging instance
@param {object} [options=null] Optional settings.
@param {Function} [options.logger=null] Custom logger function;
@param {string} [options.loggerLevel=error] Override default global log level.
@return {Logger} a Logger instance.
Creates a new Logger instance