used strictly for logging the processing of the algorithm... only useful if you intend on looking under the covers (for pretty UI's or debugging)
162810
function BuildLog(){
	var my;
	var nextSegmentId = 0;
	var curVert = false;

	function push(type, data){
		my.list.push({
			type: type,
			data: data ? JSON.parse(JSON.stringify(data)) : void 0
		});
		return my;
	}

	my = {
		list: [],
		segmentId: function(){
			return nextSegmentId++;
		},
		checkIntersection: function(seg1, seg2){
			return push('check', { seg1: seg1, seg2: seg2 });
		},
		segmentChop: function(seg, end){
			push('div_seg', { seg: seg, pt: end });
			return push('chop', { seg: seg, pt: end });
		},
		statusRemove: function(seg){
			return push('pop_seg', { seg: seg });
		},
		segmentUpdate: function(seg){
			return push('seg_update', { seg: seg });
		},
		segmentNew: function(seg, primary){
			return push('new_seg', { seg: seg, primary: primary });
		},
		segmentRemove: function(seg){
			return push('rem_seg', { seg: seg });
		},
		tempStatus: function(seg, above, below){
			return push('temp_status', { seg: seg, above: above, below: below });
		},
		rewind: function(seg){
			return push('rewind', { seg: seg });
		},
		status: function(seg, above, below){
			return push('status', { seg: seg, above: above, below: below });
		},
		vert: function(x){
			if (x === curVert)
				return my;
			curVert = x;
			return push('vert', { x: x });
		},
		log: function(data){
			if (typeof data !== 'string')
				data = JSON.stringify(data, false, '  ');
			return push('log', { txt: data });
		},
		reset: function(){
			return push('reset');
		},
		selected: function(segs){
			return push('selected', { segs: segs });
		},
		chainStart: function(seg){
			return push('chain_start', { seg: seg });
		},
		chainRemoveHead: function(index, pt){
			return push('chain_rem_head', { index: index, pt: pt });
		},
		chainRemoveTail: function(index, pt){
			return push('chain_rem_tail', { index: index, pt: pt });
		},
		chainNew: function(pt1, pt2){
			return push('chain_new', { pt1: pt1, pt2: pt2 });
		},
		chainMatch: function(index){
			return push('chain_match', { index: index });
		},
		chainClose: function(index){
			return push('chain_close', { index: index });
		},
		chainAddHead: function(index, pt){
			return push('chain_add_head', { index: index, pt: pt });
		},
		chainAddTail: function(index, pt){
			return push('chain_add_tail', { index: index, pt: pt, });
		},
		chainConnect: function(index1, index2){
			return push('chain_con', { index1: index1, index2: index2 });
		},
		chainReverse: function(index){
			return push('chain_rev', { index: index });
		},
		chainJoin: function(index1, index2){
			return push('chain_join', { index1: index1, index2: index2 });
		},
		done: function(){
			return push('done');
		}
	};
	return my;
}
873323
private static boolean printLogInfo(int obj) {
        IntBuffer iVal = BufferUtils.createIntBuffer(1);
        ARBShaderObjects.glGetObjectParameterARB(obj,
                ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);

        int length = iVal.get();
        if (length > 1) {
            // We have some info we need to output.
            ByteBuffer infoLog = BufferUtils.createByteBuffer(length);
            iVal.flip();
            ARBShaderObjects.glGetInfoLogARB(obj, iVal, infoLog);
            byte[] infoBytes = new byte[length];
            infoLog.get(infoBytes);
            String out = new String(infoBytes);
            System.out.println("Info log:\n" + out);
        } else {
            return true;
        }
        return false;
    }
1138737
public void outputTracerReport() {
    JvmMetrics.maybeWriteJvmMetrics(this.output, "verbose:pretty:all");
    calcTotalStats();

    ArrayList<Entry<String, Stats>> statEntries = new ArrayList<>();
    statEntries.addAll(this.summary.entrySet());
    Collections.sort(
        statEntries,
        new Comparator<Entry<String, Stats>>() {
          @Override
          public int compare(Entry<String, Stats> e1, Entry<String, Stats> e2) {
            return Long.compare(e1.getValue().runtime, e2.getValue().runtime);
          }
        });

    this.output.print(Joiner.on("\n").join(
        "\nTOTAL:",
        "Start time(ms): " + this.startTime,
        "End time(ms): " + this.endTime,
        "Wall time(ms): " + (this.endTime - this.startTime),
        "Passes runtime(ms): " + this.passesRuntime,
        "Max mem usage (measured after each pass)(MB): " + this.maxMem,
        "#Runs: " + this.runs,
        "#Changing runs: " + this.changes,
        "#Loopable runs: " + this.loopRuns,
        "#Changing loopable runs: " + this.loopChanges,
        "Estimated AST reduction(#nodes): " + this.astDiff,
        "Estimated Reduction(bytes): " + this.diff,
        "Estimated GzReduction(bytes): " + this.gzDiff,
        "Estimated AST size(#nodes): " + this.astSize,
        "Estimated Size(bytes): " + this.codeSize,
        "Estimated GzSize(bytes): " + this.gzCodeSize));

    this.output.print(Joiner.on("\n").join(
        "\n\nInputs:",
        "JS lines:   " + this.jsLines,
        "JS sources: " + this.jsSources,
        "Extern lines:   " + this.externLines,
        "Extern sources: " + this.externSources + "\n\n"));

    this.output.print("Summary:\n"
        + "pass,runtime,allocMem,runs,changingRuns,astReduction,reduction,gzReduction\n");
    for (Entry<String, Stats> entry : statEntries) {
      String key = entry.getKey();
      Stats stats = entry.getValue();
      this.output.print(SimpleFormat.format("%s,%d,%d,%d,%d,%d,%d,%d\n", key, stats.runtime,
            stats.allocMem, stats.runs, stats.changes, stats.astDiff, stats.diff, stats.gzDiff));
    }
    this.output.print("\n");

    this.output.print(Joiner.on("\n").join(
        "Log:",
        "pass,runtime,allocMem,codeChanged,astReduction,reduction,gzReduction,astSize,size,gzSize\n"));
    for (Stats stats : this.log) {
      this.output.print(SimpleFormat.format("%s,%d,%d,%b,%d,%d,%d,%d,%d,%d\n",
          stats.pass, stats.runtime, stats.allocMem, stats.changes == 1,
          stats.astDiff, stats.diff, stats.gzDiff, stats.astSize, stats.size, stats.gzSize));
    }
    this.output.print("\n");
    // this.output can be System.out, so don't close it to not lose subsequent
    // error messages. Flush to ensure that you will see the tracer report.
    try {
      // TODO(johnlenz): Remove this cast and try/catch.
      // This is here to workaround GWT http://b/30943295
      ((FilterOutputStream) this.output).flush();
    } catch (IOException e) {
      throw new RuntimeException("Unreachable.");
    }
  }
58114
@Override
    public void info( F0<String> msg )
    {
        if ( compilerLogger.isInfoEnabled() )
        {
            compilerLogger.info( msg.apply() );
        }
    }
1033015
def sigloss(logfile):
    ''''''
    print("Processing log %s" % filename)
    mlog = mavutil.mavlink_connection(filename,
                                      planner_format=args.planner,
                                      notimestamps=args.notimestamps,
                                      robust_parsing=args.robust)

    last_t = 0

    types = args.types
    if types is not None:
        types = types.split(',')

    while True:
        m = mlog.recv_match(condition=args.condition)
        if m is None:
            return
        if types is not None and m.get_type() not in types:
            continue
        if args.notimestamps:
            if not 'usec' in m._fieldnames:
                continue
            t = m.usec / 1.0e6
        else:
            t = m._timestamp
        if last_t != 0:
            if t - last_t > args.deltat:
                print("Sig lost for %.1fs at %s" % (t-last_t, time.asctime(time.localtime(t))))
        last_t = t
1101865
public void optimizeLineSection() {

/* Some debugging code
        for (int i = 0; i < lineData.size(); i++) {
            LineInfo li = (LineInfo)lineData.get(i);
            System.out.print(li.toString());
        }
*/
        //Incorporate each LineInfo into the previous LineInfo's 
        //outputLineIncrement, if possible
        int i = 0;
        while (i < lineData.size() - 1) {
            LineInfo li = lineData.get(i);
            LineInfo liNext = lineData.get(i + 1);
            if (!liNext.lineFileIDSet
                && liNext.inputStartLine == li.inputStartLine
                && liNext.inputLineCount == 1
                && li.inputLineCount == 1
                && liNext.outputStartLine
                    == li.outputStartLine
                        + li.inputLineCount * li.outputLineIncrement) {
                li.setOutputLineIncrement(
                    liNext.outputStartLine
                        - li.outputStartLine
                        + liNext.outputLineIncrement);
                lineData.remove(i + 1);
            } else {
                i++;
            }
        }

        //Incorporate each LineInfo into the previous LineInfo's
        //inputLineCount, if possible
        i = 0;
        while (i < lineData.size() - 1) {
            LineInfo li = lineData.get(i);
            LineInfo liNext = lineData.get(i + 1);
            if (!liNext.lineFileIDSet
                && liNext.inputStartLine == li.inputStartLine + li.inputLineCount
                && liNext.outputLineIncrement == li.outputLineIncrement
                && liNext.outputStartLine
                    == li.outputStartLine
                        + li.inputLineCount * li.outputLineIncrement) {
                li.setInputLineCount(li.inputLineCount + liNext.inputLineCount);
                lineData.remove(i + 1);
            } else {
                i++;
            }
        }
    }
347031
function _log() {
  var args = Array.prototype.slice.call(arguments, 0),
    level = args.shift();

  if (!~['log', 'error', 'warn'].indexOf(level)) {
    args.unshift(level);
    level = 'log';
  }

  if (level == 'log') {
    args[0] = '----> ' + args[0];
  } else if (level == 'error') {
    args[0] = '....> ' + colors.red('ERROR: ') + args[0];
  } else if (level == 'warn') {
    args[0] = '....> ' + colors.yellow('WARNING: ') + args[0];
  }

  console[level].apply(console, args);
}
935213
function logMethods (obj) {
  for (var key in obj) {
    if (obj.hasOwnProperty(key)) {
      if (key[0] !== '_' && !(key in EventEmitter.prototype) && typeof obj[key] === 'function' && !obj.logging) {
        obj[key] = logMethod(key, obj[key]);
      }
    }
  }
}
1129478
function () {
            this._logsPerClasspath = {};
            var i, j, iLog, jLog, max, end;
            max = 0;
            for (i = 0; i < this._nbLogs; i++) {
                iLog = this._logs[i];
                if (iLog.start && !("length" in iLog)) {
                    for (j = i + 1; j < this._nbLogs; j++) {
                        jLog = this._logs[j];
                        if (jLog.stop && jLog.classpath == iLog.classpath) {
                            if (!jLog.id || iLog.id === jLog.id) {
                                this._logs.splice(j, 1);
                                this._nbLogs--;
                                iLog.length = jLog.stop - iLog.start;
                                iLog.start = iLog.start - this._startTime;
                                break;
                            }
                        }
                    }
                    if (!("length" in iLog)) {
                        // no matching call to $stopMeasure
                        iLog.length = 0;
                        iLog.start = iLog.start - this._startTime;
                    }
                } else if (iLog.timestamp) {
                    iLog.start = iLog.timestamp - this._startTime;
                    iLog.length = 0;
                    delete iLog.timestamp;
                }

                if (!("msg" in iLog)) {
                    iLog.msg = 'NO MESSAGE';
                }

                end = iLog.start + iLog.length;
                if (end > max) {
                    max = end;
                }

                // add in processed logs object
                if (!this._logsPerClasspath[iLog.classpath]) {
                    this._logsPerClasspath[iLog.classpath] = {};
                }
                var cpLog = this._logsPerClasspath[iLog.classpath];
                if (!cpLog[iLog.msg]) {
                    cpLog[iLog.msg] = [0];
                }
                cpLog[iLog.msg].push(iLog);
                cpLog[iLog.msg][0] += iLog.length;
            }
            this._logsPerClasspath._max = max;
        }
846024
protected void writeLogging(Definition def, Writer out, int indent, String level, String content, String... params)
         throws IOException
   {
      writeIndent(out, indent);
      if (def.isSupportJbossLogging())
      {
         out.write("log.trace");
         int size = params.length;
         if (size > 0)
            out.write("f");
         out.write("(\"" + content + "(");
         for (int i = 0; i < size; i++)
         {
            out.write("%s");
            if (i < size - 1)
               out.write(", ");
         }
         out.write(")\"");
         for (int i = 0; i < size; i++)
         {
            out.write(", ");
            out.write(params[i]);
         }
         out.write(");");
      }
      else
      {
         out.write("log.finest(\"" + content + "()\");");
      }
      writeEol(out);
   }
1022997
def log_line(watch, metric, condition, result)
      status =
      if self.trigger?(metric, result)
        "[trigger]"
      else
        "[ok]"
      end

      messages = []

      # Log info if available.
      if condition.info
        Array(condition.info).each do |condition_info|
          messages << "#{watch.name} #{status} #{condition_info} (#{condition.base_name})"
          applog(watch, :info, messages.last)
        end
      else
        messages << "#{watch.name} #{status} (#{condition.base_name})"
        applog(watch, :info, messages.last)
      end

      # Log.
      debug_message = watch.name + ' ' + condition.base_name + " [#{result}] " + self.dest_desc(metric, condition)
      applog(watch, :debug, debug_message)

      messages
    end
312667
@Warmup(iterations = 5)
    @Measurement(iterations = 5)
    @Benchmark
    public void structLoggerLogging1Call() {
        structLoggerNoMessageParametrization.info("Event with double and boolean")
                .varDouble(1.2)
                .varBoolean(false)
                .log();
    }
768212
function log(e) {
    var data = $(e.element).get('track').split(';');

    // Revenue only allows numbers remove it if it is not a number.
    if ('number' !== typeof data[3]) data.splice(3);
    analytics.track(data.splice(0, 1), this.map(data));
  }
417469
def verbose
      if Calabash::Logger.log_levels.include?(:debug)
        puts Color.blue('Debug logging is already turned on.')
      else
        Calabash::Logger.log_levels << :debug
        puts Color.blue('Turned on debug logging.')
      end

      true
    end
220933
def _log(self, s):
    """
    # TODO(tewalds): Should this be using logging.info instead? How to see them
    # outside of google infrastructure?
    sys.stderr.write(s)
    sys.stderr.flush()
170889
def define_log_renderer(fmt, fpath, quiet):
    
    # it must accept a logger, method_name and event_dict (just like processors)
    # but must return the rendered string, not a dictionary.
    # TODO tty logic

    if fmt:
        return structlog.processors.JSONRenderer()

    if fpath is not None:
        return structlog.processors.JSONRenderer()

    if sys.stderr.isatty() and not quiet:
        return structlog.dev.ConsoleRenderer()

    return structlog.processors.JSONRenderer()
429743
def define_log_processors():
    
    # these processors should accept logger, method_name and event_dict
    # and return a new dictionary which will be passed as event_dict to the next one.
    return [
        structlog.processors.TimeStamper(fmt="iso"),
        _structlog_default_keys_processor,
        structlog.stdlib.PositionalArgumentsFormatter(),
        structlog.processors.StackInfoRenderer(),
        structlog.processors.format_exc_info,
    ]