Write one or more lines to the debug log
163807
public function writeDebugLog( $val ) {
		if ( $this->debugMode === false ) {
			return;
		}

		$this->runlog .= $this->getLogSection() . '> '
			. $val
			. "\n";
	}
582516
public static void newLine(DebugMode mode){
		if(debugMode == DebugMode.SILENT)
			return;
		if(mode.ordinal() >= debugMode.ordinal()){
			if(outputMode == OutputMode.SYSOUT){
				printStream.println();
			} else if(outputMode == OutputMode.FILE){
				try {
					fileWriter.newLine();
				} catch (IOException e) {
					printStream.println("Cannot write output to file: I/O Exception");
				}
			}
		}
	}
106644
def debug(msg)
      # Should probably replace with a Logger
      return unless config.debug_filename

      @debug ||= File.open(config.debug_filename, 'w')
      @debug.write("#{msg}\n")
      @debug.flush
    end
342044
public function writeDebugLog() {
		//	Only write the debug log if logging is enabled
		if ($this->_writeDebugLog) {
			$message = implode(func_get_args());
			$cellReference = implode(' -> ', $this->_cellStack->showStack());
			if ($this->_echoDebugLog) {
				echo $cellReference, 
					($this->_cellStack->count() > 0 ? ' => ' : ''), 
					$message, 
					PHP_EOL;
			}
			$this->_debugLog[] = $cellReference . 
				($this->_cellStack->count() > 0 ? ' => ' : '') . 
				$message;
		}
	}
408176
def write(self, s):
        """"""
        for line in re.split(r'\n+', s):
            if line != '':
                self._logger.log(self._level, line)
1134009
function writeLog(level, msg) {
  var line;
  if(showSourceInfo) {
    var si = getSourceInfo();
    if (includeDate) {
      line = util.format("[%s] <%s>\t[%s:%s] %s", moment().format(), level, si.file, si.lineNumber, msg);
    } else {
      line = util.format("<%s>\t[%s:%s] %s", level, si.file, si.lineNumber, msg);
    }
  } else {
    if (includeDate) {
      line = util.format("[%s] <%s>\t%s", moment().format(), level, msg);
    } else {
      line = util.format("<%s>\t%s", level, msg);
    }
  }

  line += '\n';
  appenders.forEach(function(appender) {
    appender(level, line);
  });
}
6717
public function logDebug()
  {
    if ($this->getVerbosity()>=OutputInterface::VERBOSITY_DEBUG)
    {
      $args   = func_get_args();
      $format = array_shift($args);

      $this->writeln(vsprintf('<info>'.$format.'</info>', $args));
    }
  }
339507
def debug(templ, *args):
    
    msg = templ % args if args else templ
    tmp = tempfile.gettempdir()
    with open(os.path.join(tmp, 'debug.txt'), 'a', encoding='utf8') as f:
        f.write(msg + '\n')
929592
def dump_to_log(self, logger):
        """"""
        logger.error("Execution ended in %s for cmd %s", self._retcode, self._cmd)
        for line in self._collected_stdout:
            logger.error(STDOUT_LOG_PREFIX + line)
128368
def write_line(self, line, count=1):
        """"""
        self.write(line)
        self.write_newlines(count)
874301
def dtool(debug):
    """"""
    level = logging.WARNING
    if debug:
        level = logging.DEBUG
    logging.basicConfig(
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
        level=level)
36413
function dumpDebugArray($debug_log) {
        if ( ! is_array($debug_log) ) return;

        foreach ( $debug_log as $k => $v ) {
            if ( count($v) > 1 ) {
                $this->togglePre($v[0], $v[1]);
            } else if ( is_array($v) ) {
                line_out($v[0]);
            } else if ( is_string($v) ) {
                line_out($v);
            }
        }
    }
443878
def log(lines, log_file=None):
        """"""
        err = False
        for line in lines:
            print(line)
            if log_file is not None:
                UtilClass.writelog(log_file, line, 'append')
            if 'BAD TERMINATION' in line.upper():
                err = True
                break
        if err:
            TauDEM.error('Error occurred when calling TauDEM function, please check!', log_file)
1141143
def _log(txt, config):
    
    if config.releases_debug:
        sys.stderr.write(str(txt) + "\n")
        sys.stderr.flush()
570138
def log(self, msg, error=False):
        """"""
        output = self.stdout
        if error:
            output = self.stderr

        output.write(msg)
        output.write('\n')
975390
def debug(self, message, *args, **kwargs):
        
        self._log(logging.DEBUG, message, *args, **kwargs)
237046
def activate_debug():
    
    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)
    logger.addHandler(ch)
    logger.setLevel(logging.DEBUG)