index.js
function Log(namespace) {
  // If it's called without new, still return a new instance.
  if (!(this instanceof Log)) { return new Log(namespace); }

  // Configure Log if it hasn't already
  if (!logger) { Log.configure(); }

  // This gets all of the log levels and applies them to this
  Object.keys(logger.levels).forEach(function (level) {
    if (!namespace) {
      this[level] = logger[level].bind(logger);
      return;
    }

    this[level] = function () {
      var args = Array.prototype.slice.call(arguments);
      args.unshift('[' + namespace + ']');
      logger[level].apply(logger, args);
    };

  }, this);
}
function Log(namespace) {
  // If it's called without new, still return a new instance.
  if (!(this instanceof Log)) { return new Log(namespace); }

  // Configure Log if it hasn't already
  if (!logger) { Log.configure(); }

  // This gets all of the log levels and applies them to this
  Object.keys(logger.levels).forEach(function (level) {
    if (!namespace) {
      this[level] = logger[level].bind(logger);
      return;
    }

    this[level] = function () {
      var args = Array.prototype.slice.call(arguments);
      args.unshift('[' + namespace + ']');
      logger[level].apply(logger, args);
    };

  }, this);
}
function Log ( namespace ) { // If it's called without new, still return a new instance. if ( ! ( this instanceof Log ) ) { return new Log ( namespace ) ; } // Configure Log if it hasn't already if ( ! logger ) { Log . configure ( ) ; } // This gets all of the log levels and applies them to this Object . keys ( logger . levels ) . forEach ( function ( level ) { if ( ! namespace ) { this [ level ] = logger [ level ] . bind ( logger ) ; return ; } this [ level ] = function ( ) { var args = Array . prototype . slice . call ( arguments ) ; args . unshift ( '[' + namespace + ']' ) ; logger [ level ] . apply ( logger , args ) ; } ; } , this ) ; }
Log  You create a new log by specifying a namespace. This basically only keeps track of the namepace prefix that goes into each log. If nothing is passed, then it doesn't prefix it with anything.
Log You create a new log by specifying a namespace . This basically only keeps track of the namepace prefix that goes into each log . If nothing is passed then it doesn t prefix it with anything .