Writes out and err (both should be strings) to logfile.
486121
def write_to_logfile(out, err, logfile, samplelog=None, sampleerr=None, analysislog=None, analysiserr=None):
    
    # Run log
    with open(logfile + '_out.txt', 'a+') as outfile:
        outfile.write(out + '\n')
    with open(logfile + '_err.txt', 'a+') as outfile:
        outfile.write(err + '\n')
    # Sample log
    if samplelog:
        with open(samplelog, 'a+') as outfile:
            outfile.write(out + '\n')
        with open(sampleerr, 'a+') as outfile:
            outfile.write(err + '\n')
    # Analysis log
    if analysislog:
        with open(analysislog, 'a+') as outfile:
            outfile.write(out + '\n')
        with open(analysiserr, 'a+') as outfile:
            outfile.write(err + '\n')
161263
def logWrite(self, string):
		""""""
		logFile = open(self.logFile, 'at')
		logFile.write(string + '\n')
		logFile.close()
70951
function writeLogFile(file, line) {
     
    if (file === undefined || file === null) {
        return;
    }
    
    fs.appendFile(file, line + os.EOL, {}, function() {
        //
    });
}
796799
def puts_err(s='', newline=True, stream=STDERR):
    """"""
    puts(s, newline, stream)
148752
def err(*args):
    
    for value in args:
        sys.stderr.write(value)

    sys.stderr.write(os.linesep)
940719
def _write_status_to_log(self, return_code, stream=sys.stdout):
        """"""
        stream.write("Timestamp: %i\n" % get_timestamp())
        if return_code == 0:
            stream.write("%s\n" % self._interface.string_successful)
        else:
            stream.write("%s %i\n" %
                         (self._interface.string_exited, return_code))
1193008
private void printErrors(){
        if (errorLog.isFile()){
            FileReader fileReader;
            try {
                fileReader = new FileReader(errorLog);
                BufferedReader bufferedReader = new BufferedReader(fileReader);
                String currLine;
                while ((currLine = bufferedReader.readLine()) != null){
                    logger.debug(currLine);
                }
                fileReader.close();
            } catch (Exception e) {
                logger.warn("Error printing cmd command errors {} " , e.getMessage());
                logger.debug("Error: {}", e.getStackTrace());
            } finally {
                try {
                    FileUtils.forceDelete(errorLog);
                } catch (IOException e) {
                    logger.warn("Error closing cmd command errors file {} " , e.getMessage());
                    logger.debug("Error: {}", e.getStackTrace());
                }
            }
        }
    }
240031
def write(self, out):
        """"""
        out.write_string(self.text, len(self.text))
427355
def write(*args, **kwargs):
    """"""
    debug = kwargs.pop("debug", None)
    warning = kwargs.pop("warning", None)
    if _logger:
        kwargs.pop("end", None)
        kwargs.pop("file", None)
        if debug:
            _logger.debug(*args, **kwargs)
        elif warning:
            _logger.warning(*args, **kwargs)
        else:
            _logger.info(*args, **kwargs)
    else:
        print(*args, **kwargs)
1311781
def log(self, logfile=None):
        """"""
        if logfile is None:
            logfile = sys.stderr
        tb = self.plaintext.rstrip() + u"\n"
        logfile.write(to_native(tb, "utf-8", "replace"))
694565
def errReceived(self, data):
        
        lines = data.splitlines()
        for line in lines:
            log_error("*** {name} stderr *** {line}", 
                    name=self.name,
                    line=self.errFilter(line))
725068
public void printErrors(PrintWriter out)
	{
		for (VDMError e : getErrors())
		{
			out.println(e.toString());
		}
	}
815880
private static void reportError(List messages, String fileName, int lineNr, String line, String errorMessage) {
		messages.add(new Date() + " ERROR in \"" + fileName + "\" at line " + lineNr + ':');
		messages.add(errorMessage);
	}
1183877
def write_log(self, message):
        
        if self._is_write_log and self.log_file and not self.log_file.closed:
            self.log_file.write(message + '\n')
461561
def print_err(*args, **kwargs):
    
    if kwargs.get('file', None) is None:
        kwargs['file'] = sys.stderr
    print(*args, **kwargs)
184170
def error(self, msg, repeat_at_end=True):
        """"""
        print(msg, file=sys.stderr)
        if repeat_at_end:
            self.error_log.append(msg)
321012
def write_file(data, outfilename):
    """"""
    if not data:
        return False
    try:
        with open(outfilename, 'w') as outfile:
            for line in data:
                if line:
                    outfile.write(line)
        return True
    except (OSError, IOError) as err:
        sys.stderr.write('An error occurred while writing {0}:\n{1}'
                         .format(outfilename, str(err)))
        return False