whenever we log anything spit out a header cleaner output when using grunt watch
172341
function printLogHeader (e) {
      if (e.show && logHeader) {
        logHeader = false;
        grunt.log.header('Task "acetate:' + target + '" running');
      }
    }
482527
function(brk) {
		hooks.enableHooks(
			brk,
			function(module, port) {
				grunt.log.ok('Debugging forked process %s on port %d', module, port);
			}
		);
	}
1024077
function (grunt, rootPath, tasks) {
		tasks.forEach(function (name) {
			if (name === 'grunt-cli') return;
			var cwd = process.cwd();
			process.chdir(rootPath); // load files from proper root, I don't want to install everything locally per module!
			grunt.loadNpmTasks(name);
			process.chdir(cwd);
		});
	}
385968
function watchifyFile(src, out) {
    var opts = assign({}, watchify.args, {
        entries: src,
        standalone: "NavMesh",
        debug: true
    });
    var b = watchify(browserify(opts));
    function bundle() {
        return b.bundle()
            .on('error', gutil.log.bind(gutil, "Browserify Error"))
            .pipe(source(src.replace(/^src\//, '')))
            .pipe(derequire())
            .pipe(gulp.dest(out));
    }
    b.on('update', bundle);
    b.on('log', gutil.log);
    return bundle();
}
136810
function writeChangelog(changelog) {
      var fileContents = null;
      var firstLineFile = null;
      var firstLineFileHeader = null;
      var regex = null;

      if (options.insertType && grunt.file.exists(options.dest)) {
        fileContents = grunt.file.read(options.dest);
        firstLineFile = fileContents.split('\n')[0];
        grunt.log.debug('firstLineFile = ' + firstLineFile);

        switch (options.insertType) {
          case 'prepend':
            changelog = changelog + '\n' + fileContents;
            break;
          case 'append':
            changelog = fileContents + '\n' + changelog;
            break;
          default:
            grunt.fatal('"' + options.insertType + '" is not a valid insertType. Please use "append" or "prepend".');
            return false;
        }
      }

      if (options.fileHeader) {
        firstLineFileHeader = options.fileHeader.split('\n')[0];
        grunt.log.debug('firstLineFileHeader = ' + firstLineFileHeader);

        if (options.insertType === 'prepend') {
          if (firstLineFile !== firstLineFileHeader) {
            changelog = options.fileHeader + '\n\n' + changelog;
          } else {
            regex = new RegExp(options.fileHeader+'\n\n','m');
            changelog = options.fileHeader + '\n\n' + changelog.replace(regex, '');
          }

        // insertType === 'append' || undefined
        } else {
          if (firstLineFile !== firstLineFileHeader) {
            changelog = options.fileHeader + '\n\n' + changelog;
          }
        }

      }


      grunt.file.write(options.dest, changelog);

      // Log the results.
      grunt.log.ok(changelog);
      grunt.log.writeln();
      grunt.log.writeln('Changelog created at '+ options.dest.toString().cyan + '.');
    }
1272558
function(callback) {
        grunt.log.write(wrap('===== saving hashes... '));
        ftpout.put(new Buffer(JSON.stringify(localHashes)), 'push-hashes', function(err) {
          if (err) { done(err); }
          grunt.log.writeln(wrapRight('[SUCCESS]').green);
          callback();
        });
      }
110883
function timeAndLog(text) {
  if (active) {
    var spaces = space.substring(0, currentIndentation);
    console.error('TRACER TXT', meaningfulTime(), spaces, text);
  }
}
908607
function notifyIPCWatchCompileDone(index) {
        ipc.config.id = serverName + index;
        ipc.config.stopRetrying = 3;
        ipc.config.silent = true;

        ipc.connectTo(
            serverName,
            function() {
                ipc.of.webpack.emit('done', index);
            }
        );
    }
928619
function readme(worker, watcher, done) {
    var cb = done;
    if (gutil.env.watch || gutil.env.w) {
      cb = function (err) {
        if (err) {
          done(err);
        } else {
          watcher(done);
        }
      };
    }

    worker(cb);
  }
1275345
def log_head(path, log_file, log_time):
    
    with open(path + log_file, "w") as log:
        log.write("#" * 79 + "\n\n")
        log.write("File : " + log_file + "\n")
        log.write("Path : " + path + "\n")
        log.write("Date : " + time.strftime("%d/%m/%Y") + "\n")
        log.write("Time : " + log_time + "\n\n")
        log.write("#" * 79 + "\n\n")
        log.close()
868439
function watchChanges(io, params) {
    const folder = process.cwd();
    return watch(folder, { recursive: true }, () => {
        emitInfo('changes detected. Recompiling...');
        io.sockets.emit('load');
        const start = new Date().getTime();
        executeWithParams(params)
            .tap(alerts => {
                const ellapsed = new Date().getTime() - start;
                emitSuccess(`wow! recompiled and executed in ${ellapsed}ms!`);
                io.sockets.emit('update', compileMarkdown(alerts));
            })
            .catch(err => {
                emitError(`hot compilation error, baby: ${err.message}`);
                io.sockets.emit('failure', err.stack);
            });
    });
}
294980
function clean() {
    swig.log.info('', 'Cleaning the /public directory...');

    let paths = [
      './public/**/{target}/**/*',
      '!./public/**/{target}/**/config',
      '!./public/**/{target}/**/config/**/*',
      '!./public/**/{target}/**/src',
      '!./public/**/{target}/**/src/**/*',
      '!./public/css/{target}/main.less',
      '!./public/spec/{target}/**/*'
    ];

    paths = _.map(paths, p => p.replace('{target}', swig.pkg.name));
    const files = glob.sync(paths);

    swig.log.verbose(`[clean] ${files.length} files found at: `);
    swig.log.verbose(paths);

    _.each(files, (file) => {
      swig.log.verbose(`[clean] removing: ${file}`);
      rimraf.sync(path.normalize(file));
    });
  }
1360812
function createTscCompileTask(watch) {
	return () => {
		const createReporter = require('./lib/reporter').createReporter;

		return new Promise((resolve, reject) => {
			const args = ['./node_modules/.bin/tsc', '-p', './src/tsconfig.monaco.json', '--noEmit'];
			if (watch) {
				args.push('-w');
			}
			const child = cp.spawn(`node`, args, {
				cwd: path.join(__dirname, '..'),
				// stdio: [null, 'pipe', 'inherit']
			});
			let errors = [];
			let reporter = createReporter();
			let report;
			// eslint-disable-next-line no-control-regex
			let magic = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; // https://stackoverflow.com/questions/25245716/remove-all-ansi-colors-styles-from-strings

			child.stdout.on('data', data => {
				let str = String(data);
				str = str.replace(magic, '').trim();
				if (str.indexOf('Starting compilation') >= 0 || str.indexOf('File change detected') >= 0) {
					errors.length = 0;
					report = reporter.end(false);

				} else if (str.indexOf('Compilation complete') >= 0) {
					report.end();

				} else if (str) {
					let match = /(.*\(\d+,\d+\): )(.*: )(.*)/.exec(str);
					if (match) {
						// trying to massage the message so that it matches the gulp-tsb error messages
						// e.g. src/vs/base/common/strings.ts(663,5): error TS2322: Type '1234' is not assignable to type 'string'.
						let fullpath = path.join(root, match[1]);
						let message = match[3];
						// @ts-ignore
						reporter(fullpath + message);
					} else {
						// @ts-ignore
						reporter(str);
					}
				}
			});
			child.on('exit', resolve);
			child.on('error', reject);
		});
	};
}
968963
function startForeverWithIndex( index, doneCB ) {
  log( 'Attempting to start ' + index + ' as daemon.');

  var config;
  var appendConfig = function(prop, value) {
    log('Adding to config: ' + prop + ', ' + value);
    if(value !== undefined) {
      config[prop] = value;
    }
  };
  done = doneCB || this.async();
  findProcessWithIndex( index, function(process) {
    // if found, be on our way without failing.
    if( typeof process !== 'undefined' ) {
      warn( index + ' is already running.');
      log( forever.format(true, [process]) );
      done();
    }
    else {
      gruntRef.file.mkdir(logDir);
      // 'forever start -o out.log -e err.log -c node -a -m 3 index.js';
      config = {
        command: commandName,
        append: true,
        max: 3,
        killSignal: killSignal
      };
      appendConfig('errFile', errFile);
      appendConfig('outFile', outFile);
      appendConfig('logFile', logFile);
      forever.startDaemon( index, config );
      log( 'Logs can be found at ' + logDir + '.' );
      done();
    }
  });
}
875121
function watchCompiler(compiler, options={}){
  let watching = false
  log('Watch Building')
  const startWatchTime = Date.now()
  const watchConfig = { // watch options:
    //aggregateTimeout: 300, // wait so long for more changes
    //poll: true // use polling instead of native watchers
    // pass a number to set the polling interval
  }

  options.onRebuild = options.onRebuild || function(){}

  return new Promise(function(res,rej){  
    //webpack watch functionality
    compiler.watch(watchConfig, function(err,stats){
      if(err)return rej(err)

      if(watching){
        log('Rebuilt '+getServerTime())
        options.onRebuild(stats)
      }else{
        watching = true
        log('Watching '+(Date.now()-startWatchTime)/1000+' seconds')
        res( this )
      }
    });
  })
}
1275651
public synchronized void dumpWatches(PrintWriter pwriter, boolean byPath) {
        if (byPath) {
            for (Entry<String, HashSet<Watcher>> e : watchTable.entrySet()) {
                pwriter.println(e.getKey());
                for (Watcher w : e.getValue()) {
                    pwriter.print("\t0x");
                    pwriter.print(Long.toHexString(((ServerCnxn)w).getSessionId()));
                    pwriter.print("\n");
                }
            }
        } else {
            for (Entry<Watcher, HashSet<String>> e : watch2Paths.entrySet()) {
                pwriter.print("0x");
                pwriter.println(Long.toHexString(((ServerCnxn)e.getKey()).getSessionId()));
                for (String path : e.getValue()) {
                    pwriter.print("\t");
                    pwriter.println(path);
                }
            }
        }
    }
370384
function(cmd, showLog, next){
                connection.exec(cmd, function(err, stream) {
                    if (err) {
                        grunt.log.errorlns(err);
                        grunt.log.subhead('ERROR DEPLOYING. CLOSING CONNECTION AND DELETING RELEASE.');

                        deleteRelease(closeConnection);
                    }
                    stream.on('data', function(data, extended) {
                        grunt.log.debug((extended === 'stderr' ? 'STDERR: ' : 'STDOUT: ') + data);
                    });
                    stream.on('end', function() {
                        grunt.log.debug('REMOTE: ' + cmd);
                        if(!err) {
                            next();
                        }
                    });
                });
            }