Log by `type` with `args`.

@param {String} type
@param {Arguments} args
@param {String} color
437010
function log(type, args, color){
  pad();
  var msg = format.apply(format, args);
  if (color) msg = chalk[color](msg);
  var pre = prefix();
  console[type](pre, msg);
}
156714
def log(type, str)
      case type
      when :connect
        @logger << Colors.green(str)
      when :close
        @logger << Colors.red(str)
      when :read
        @logger << Colors.gold(str)
      when :write
        @logger << Colors.white(str)
      else
        raise "unknown event type: #{type.inspect}"
      end
    end
741280
function log(msg, color) {
        if (typeof(msg) === 'object') {
            for (var item in msg) {
                if (msg.hasOwnProperty(item)) {
                    if(color && color in $.util.colors) {
                        $.util.log($.util.colors[color](msg[item]));
                    }
                    $.util.log($.util.colors.lightgreen(msg[item]));
                }
            }
        } else {
            $.util.log($.util.colors.green(msg));
        }
    }
654893
function log() {
  var args = NS ? [chalk.bold.gray(NS)] : []
  for(var i=0; i<arguments.length; i++) {
    var arg = arguments[i];
    args.push(chalk.cyan( typeof arg === "object" ? JSON.stringify(arg) : arg ))

    // adds a separator
    if(i < arguments.length-1) args.push(chalk.gray("|"));
  }
  if(testLog)   testLog(args);
  else          console.log.apply(null, args)
}
1287620
function Callback (retType, argTypes, abi, func) {
  debug('creating new Callback');

  if (typeof abi === 'function') {
    func = abi;
    abi = undefined;
  }

  // check args
  assert(!!retType, 'expected a return "type" object as the first argument');
  assert(Array.isArray(argTypes), 'expected Array of arg "type" objects as the second argument');
  assert.equal(typeof func, 'function', 'expected a function as the third argument');

  // normalize the "types" (they could be strings, so turn into real type
  // instances)
  retType = ref.coerceType(retType);
  argTypes = argTypes.map(ref.coerceType);

  // create the `ffi_cif *` instance
  const cif = CIF(retType, argTypes, abi);
  const argc = argTypes.length;

  const callback = _Callback(cif, retType.size, argc, errorReportCallback, (retval, params) => {
    debug('Callback function being invoked')
    try {
      const args = [];
      for (var i = 0; i < argc; i++) {
        const type = argTypes[i];
        const argPtr = params.readPointer(i * ref.sizeof.pointer, type.size);
        argPtr.type = type;
        args.push(argPtr.deref());
      }

      // Invoke the user-given function
      const result = func.apply(null, args);
      try {
        ref.set(retval, 0, result, retType);
      } catch (e) {
        e.message = 'error setting return value - ' + e.message;
        throw e;
      }
    } catch (e) {
      return e;
    }
  });

  return callback;
}
863740
function formatArgs(args) {
	const {namespace: name, useColors} = this;

	if (useColors) {
		const c = this.color;
		const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
		const prefix = `  ${colorCode};1m${name} \u001B[0m`;

		args[0] = prefix + args[0].split('\n').join('\n' + prefix);
		args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
	} else {
		args[0] = getDate() + name + ' ' + args[0];
	}
}
1170642
function write(msg, color, prefix) {
	if (!prefix)
		prefix = clc.cyan('[conquer]');

	// Print each line of the message on its own line.
	var messages = msg.split('\n');
	for (var i = 0; i < messages.length; i++) {
		var message = messages[i].replace(/(\s?$)|(\n?$)/gm, '');
		if (message && message.length > 0)
			console.log(prefix, color ? color(message) : message);
	}
}
805824
function (description, args, type) {
    var name = args.shift();
    this.internals.argv.describe(name, description);

    for (var i = 0; i < args.length; ++i) {
      this.internals.argv.alias(args[i], name);
    }

    switch (type) {
      case 'string':
        this.internals.argv.string(name);
        break;

      case 'boolean':
        this.internals.argv.boolean(name);
        break;

      default:
        return false;
    }

    return true;
  }
557438
def log(message, type = nil)
      unless Alchemy::Shell.silenced?
        case type
        when :skip
          puts "#{color(:yellow)}== Skipping! #{message}#{color(:clear)}"
        when :error
          puts "#{color(:red)}!! ERROR: #{message}#{color(:clear)}"
        when :message
          puts "#{color(:clear)}#{message}"
        else
          puts "#{color(:green)}== #{message}#{color(:clear)}"
        end
      end
    end
529352
function log(logger, message, type) {
  if(!logger) return
  if(logger.toConsole) {
    if (console.group) console.group('i18n-tag-schema')
    const log = console[type] || console.log
    log(message)
    if (console.groupEnd) console.groupEnd()
  } else {
    const log = logger[type]
    if(log) log(message)
  }
}
1019983
function(sType, aArgs, oSelf) {
        var logEntry = aArgs[0];
        oSelf._buffer.push(logEntry);

        if (oSelf.logReaderEnabled === true && oSelf._timeout === null) {
            oSelf._timeout = setTimeout(function(){oSelf._printBuffer();}, oSelf.outputBuffer);
        }
    }
155151
function(type, args) {
        var debug = this.options.debug || Toolkit.debug;

        if (debug) {
            console.log(this.name + '#' + this.uid, new Date().getMilliseconds(), type, args || []);

            if (debug === 'verbose') {
                console.dir(this);
            }
        }

        var hooks = this.__hooks[type];

        if (hooks) {
            $.each(hooks, function(i, hook) {
                hook.apply(this, args || []);
            }.bind(this));
        }
    }
1320264
function color(...args) {

    // If you want to straight up highlight a string you can pass the
    // string of code, the language, and a callback function.
    //
    // Example:
    //
    // Rainbow.color(code, language, function(highlightedCode, language) {
    //     // this code block is now highlighted
    // });
    if (typeof args[0] === 'string') {
        const workerData = _getWorkerData(args[0], args[1]);
        _messageWorker(workerData, (function(cb) {
            return function(data) {
                if (cb) {
                    cb(data.result, data.lang);
                }
            };
        }(args[2])));
        return;
    }

    // If you pass a callback function then we rerun the color function
    // on all the code and call the callback function on complete.
    //
    // Example:
    //
    // Rainbow.color(function() {
    //     console.log('All matching tags on the page are now highlighted');
    // });
    if (typeof args[0] === 'function') {
        _highlight(0, args[0]);
        return;
    }

    // Otherwise we use whatever node you passed in with an optional
    // callback function as the second parameter.
    //
    // Example:
    //
    // var preElement = document.createElement('pre');
    // var codeElement = document.createElement('code');
    // codeElement.setAttribute('data-language', 'javascript');
    // codeElement.innerHTML = '// Here is some JavaScript';
    // preElement.appendChild(codeElement);
    // Rainbow.color(preElement, function() {
    //     // New element is now highlighted
    // });
    //
    // If you don't pass an element it will default to `document`
    _highlight(args[0], args[1]);
}
1091272
function (type, args) {
	this.type = type;
	this.single = false;

	// Message is a 'multiple attribute message'.
	if (typeof args === 'object' || typeof args === 'undefined') {
		this.args = args || {};
	}
	// Message is a 'single attribute message'.
	else {
		this.single = true;
		this.args = args;
	}

	if (!this.single) {
		if (this.args.flowId) {
			this.arg('flowId', this.args.flowId);
		}
		else if (index.autoFlowId) {
			this.arg('flowId', Message.flowId);
		}
	}
}
67809
function Logger(ctx) {
    _console = window ? window.console : {};
    _global = window ? window : {};
    this._timers = {};
    this.args = function(context, level, args) {
        let logHeader = '%c '+level+' %c'+(new Date().toISOString())+' %c'+context;
        const colors = [_bc+_c1, _bc+_c2, _bc+_c3];
        for (let i = 0; i < args.length; i++) {
            if (typeof args[i] == 'string' && args[i].indexOf('timer:') === 0) {
                const t = args[i].split(':');
                if (t.length === 3) {
                    let elapsed;
                    switch (t[2]) {
                        case 'start':
                            this._timers[t[1]] = new Date().getTime();
                            logHeader += ' %cSTART '+t[1];
                            colors.push(_bc+_c_start);
                            break;
                        case 'stop':
                            elapsed = (new Date().getTime() - this._timers[t[1]]);
                            logHeader += ' %cSTOP '+t[1]+' '+elapsed+' ms';
                            if (elapsed > 200) {
                                colors.push(_bc+_c_end_very_slow);
                            } else if (elapsed > 100) {
                                colors.push(_bc+_c_end_slow);
                            } else {
                                colors.push(_bc+_c_end);
                            }
                            break;
                    }
                }
            }
        }
        logHeader += ' \n%c '; colors.push(_bt+'color:inherit;');
        // if (typeof args[0] == 'string') {
        //     logHeader += ' %c' + args[0];
        //     Array.prototype.shift.call(args);
        // }
        for (let c = colors.length-1; c >= 0; c--) {
            Array.prototype.unshift.call(args, colors[c]);
        }
        Array.prototype.unshift.call(args, logHeader);
        Array.prototype.push.call(args, '\n\n');
    };
    this.log = function(level, args) {
        if (typeof _callback === 'function') {
            _callback.call(ctx, level, args);
        }
        // route event
        if (!_global.zuixNoConsoleOutput) {
            this.args(ctx, level, args);
            _console.log.apply(_console, args);
        }
    };
}
343592
function logger(type) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    var msg = args.shift();
    var fn = chek_1.isFunction(chek_1.last(args)) ? args.pop() : chek_1.noop;
    var meta = chek_1.isPlainObject(chek_1.last(args)) ? args.pop() : null;
    var obj = {
        type: type,
        msg: null,
        meta: meta
    };
    var formatters = chek_1.isString(msg) ? msg.match(/%/g) : null;
    if (formatters && formatters.length)
        msg = util_1.format.apply(void 0, [msg].concat(args));
    else
        msg = [msg].concat(args).join(' ');
    if (type === 'error' && !(msg instanceof Error)) {
        msg = new Error(msg);
        var stack = msg.stack.split('\n');
        var tmpMsg = stack.shift();
        stack.shift();
        stack.unshift(tmpMsg);
        msg.stack = stack.join('\n');
    }
    // If any error just throw it.
    if (msg instanceof Error) {
        if (fn)
            fn(msg, obj);
        msg.stack = msg.stack.split('\n').map(function (s, i) {
            if (i === 0)
                return colurs.applyAnsi('[error]', _log.colors.error) + ' ' + (msg.name || 'Error') + ': ' + msg.message;
            return s;
        }).join('\n');
        throw msg;
    }
    obj.msg = msg;
    fn(msg, obj);
    if (meta) {
        meta = util_1.inspect(meta, null, null, true);
        msg += ('\n' + meta);
    }
    if (type && _log.colors[type])
        msg = colurs.applyAnsi('[' + type + ']: ', _log.colors[type]) + msg;
    process.stderr.write(msg + '\n');
    return _log;
}
1303490
function (options) {
  var self = this

  options = options || {}
  this.logFn = options.logFn || console.log
  this.warnFn = options.warnFn || console.warn
  this.verbosity = options.verbosity || 0
  this.theme = options.theme || DEFAULT_THEME

  /*
   * colorise can be set to a function which receives the theme and the
   * operation's defining arguments, and which is expected to return the
   * colorised arguments.
   */
  if (options.colorise === undefined || options.colorise === true) {
    this.colorise = colorise
  } else if (options.colorise) {
    this.colorise = options.colorise
  } else {
    this.colorise = dontColorise
  }
}