/*function logger(output) {
if(!preview) return;
console.log(output);
}
15499
function uniqueAdd(val, arr) {
  if(arr.indexOf(val)===-1){
    arr.push(val);
  }
  return arr;
}
1264442
function loggerFactory(
    events,
    Constants,
    assert,
    _,
    util,
    stack,
    nconf
) {
    var levels = _.keys(Constants.Logging.Levels);

    function getCaller (depth) {
        var current = stack.get()[depth];

        var file = current.getFileName().replace(
            Constants.WorkingDirectory,
            ''
        ) + ':' + current.getLineNumber();

        return file.replace(/^node_modules/, '');
    }

    function Logger (module) {
        var provides = util.provides(module);

        if (provides !== undefined) {
            this.module = provides;
        } else {
            if (_.isFunction(module)) {
                this.module = module.name;
            } else {
                this.module = module || 'No Module';
            }
        }
    }

    Logger.prototype.log = function (level, message, context) {
        assert.isIn(level, levels);
        assert.string(message, 'message');

        // Exit if the log level of this message is less than the minimum log level.
        var minLogLevel = nconf.get('minLogLevel');
        if ((minLogLevel === undefined) || (typeof minLogLevel !== 'number')) {
            minLogLevel = 0;
        }
        if (Constants.Logging.Levels[level] < minLogLevel) {
            return;
        }

        events.log({
            name: Constants.Name,
            host: Constants.Host,
            module: this.module,
            level: level,
            message: message,
            context: context,
            timestamp: new Date().toISOString(),
            caller: getCaller(3),
            subject: 'Server'
        });
    };

    _.forEach(levels, function(level) {
        Logger.prototype[level] = function (message, context) {
            this.log(level, message, context);
        };
    });

    Logger.prototype.deprecate = function (message, frames) {
        console.error([
            'DEPRECATION:',
            this.module,
            '-',
            message,
            getCaller(frames || 2)
        ].join(' '));
    };

    Logger.initialize = function (module) {
        return new Logger(module);
    };

    return Logger;
}
565101
function log() {
  if (typeof print === 'function') {
    print.apply(this, arguments)
  } else {
    console.log.apply(console, arguments)
  }
}
748738
function Logger(tags) {
    tags = parseTags(Array.prototype.slice.call(arguments));

    if (!(this instanceof Logger)) {
        return new Logger(tags);
    }

    this.tags = tags;
}
816131
function OutputTee(logfileOutput, terminalOutput) {

    this._outputs = [];
    this._outputs[_OUTPUT_TEE_LOGFILE] = logfileOutput;
    this._outputs[_OUTPUT_TEE_TERMINAL] = terminalOutput;
}
74125
function logToConsole(tags, message) {
    if (enabled) {
        if (arguments.length < 2) {
            message = tags;
            tags = [];
        }

        if (!util.isArray(tags)) tags = [];

        var text = new Date().getTime() + ', ';
        if (tags.length > 0) {
            text = text + tags[0] + ', ';
        }
        text = text + message;
        console.log(text);
    }
}
991071
function log(type) {
  var messages = Array.prototype.slice.call(arguments);
  messages.shift();
  // Concatenate default strings and first message argument into
  // one string so we can use `printf`-like replacement
  var first = "JPM [" + type + "] " + (messages.shift() + "");

  if (process.env.NODE_ENV !== "test") {
    console.log.apply(console, [first].concat(messages)); // eslint-disable-line no-console
  }
}
718763
function log() {
  var _console;

  return Postmate.debug ? (_console = console).log.apply(_console, arguments) : null;
}
539403
function log(err) {
    if (_logger) {
      if (typeof(err) == 'string') {
        err = { message: err, code: 0 }
      }
      _logger(err);
    }
  }
172341
function printLogHeader (e) {
      if (e.show && logHeader) {
        logHeader = false;
        grunt.log.header('Task "acetate:' + target + '" running');
      }
    }
588015
function logger(globalName) {
  return function() {
    var args = Array.prototype.slice.call(arguments, 0);
    var global = globalName || pkg.name;

    return debug(
      args.length > 0 ?
      [global, args.join(':')].join(':') :
      global
    )
  }
}
1063761
function (msg) {

            if (!isLog()) {
                return undefined;
            }

            if (msg) {
                console.log(_utils.now() + " " + msg);
                this.log2file(msg);
            }
        }
886667
function log () {
  if (mocking) {
    cli.stdout += stripAnsi(concatArguments(arguments) + '\n')
  } else {
    console.log.apply(null, arguments)
  }
}
1190645
function(msg) {
  if (window.console && window.console.log) {
    window.console.log(msg);
  }
}
270660
function output (s, outputHandler) {
  if (outputHandler) {
    outputHandler(s);
  } else {
    process.stdout.write(s);
  }
}
772367
function Logger (context) {
    var loggerObj, i;

    if (!context || context.length === 0) {
        throw new Error("Invalid 'context' for Logger: " + context);
    }

    loggerObj = {
        debug   : function(scope, message) {
            console.debug(context + separator +
                scope +
                (message && message.length > 0 ? separator + message : "")
            );
        },
        info    : function(scope, message) {
            console.info(context + separator +
                scope +
                (message && message.length > 0 ? separator + message : "")
            );
        },
        warn    : function(scope, message) {
            console.warn(context + separator +
                scope +
                (message && message.length > 0 ? separator + message : "")
            );
        },
        error   : function(scope, message) {
            console.error(context + separator +
                scope +
                (message && message.length > 0 ? separator + message : "")
            );
        }
    };


    return loggerObj;
}
1364000
function createLogger( {
  collapsed = true,
  transformer = state => state,
  actionTransformer = action => action
} = {} ) {
  return ( Base, store ) => {
    let prevState = JSON.parse( JSON.stringify( store.getState() ) )
    store.subscribe( ( action, state ) => {
      const nextState = JSON.parse( JSON.stringify( state ) )
      const time = new Date()
      const formattedTime = ` @ ${ pad( time.getHours(), 2 ) }:${ pad( time.getMinutes(), 2 ) }:${ pad( time.getSeconds(), 2 ) }.${ pad( time.getMilliseconds(), 3 ) }`
      const message = `commit ${ action.type }${ formattedTime }`

      if ( collapsed ) {
        console.groupCollapsed( message )
      } else {
        console.group( message )
      }

      console.log( '%c prev state', 'color: #9E9E9E; font-weight: bold', transformer( prevState ) )
      console.log( '%c action', 'color: #03A9F4; font-weight: bold', actionTransformer( action ) )
      console.log( '%c next state', 'color: #4CAF50; font-weight: bold', transformer( nextState ) )

      console.groupEnd( message )

      prevState = nextState
    } )
  }
}