Various writeXXX() methods are used for logging statements.
438745
void writeStatement(Session session, String s) {

        try {
            dbLogWriter.writeLogStatement(session, s);
        } catch (IOException e) {
            throw Error.error(ErrorCode.FILE_IO_ERROR, logFileName);
        }

        if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) {
            database.logger.needsCheckpoint = true;
        }
    }
406419
private static void log(PrintStream ps, String header, 
                            String owner, String message, Exception ex) {
        // Only allow one instance to print to the given stream.
        synchronized (ps) {
            // Create output stream for logging
            LogStream logStream = new LogStream(ps);
	    
            logStream.time = new Date(System.currentTimeMillis());
            logStream.header = header;
            logStream.owner = owner;
	    
            if (message != null)
                logStream.println(message);
	    
            if (ex != null) {
                logStream.println(ex.getMessage());
                ex.printStackTrace(logStream);
            }
        }
    }
286444
function log(patch) {
		var mw = (patch || core.base());
		mw.enabled = true;
		// let's be gentle
		if (console) {
			mw.writeln = function (str) {
				if (mw.enabled) {
					console.log(String(str));
				}
			};
		}
		else {
			mw.writeln = function (/*str*/) {
				// ignore?
			};
		}
		if (!patch) {
			mw.toString = function () {
				return '<miniwrite-log>';
			};
		}
		return mw;
	}
1163804
function write(src, lvl, obj) {

    var stack = null;
    var lvlInt = levels[lvl];
    var msg;

    if (   typeof process.env.LOG_LEVEL == "string" 
        && levels[process.env.LOG_LEVEL.toLowerCase()] > lvlInt) {
        return false;
    }

    if (process.env.JSONCONSOLE_DISABLE_JSON_OUTPUT) {
        return src.write(util.format(obj)+os.EOL);
    }

    if (lvlInt >= 40) {
        if (obj instanceof Error) {
            stack = obj.stack;
        } else {
            stack = new Error().stack.split("\n");
            stack.splice(1, 4); // obfuscate the trace inside the logger.
            stack = stack.join('\n');
        }
    }


    if (obj instanceof RawValue) {
        msg = util.inspect(obj.raw);
    } else if (typeof obj == "string") {
        msg = obj;
    } else {
        msg = util.inspect(obj);
    }

    var log = {
        name: options.name,
        hostname,
        pid: process.pid,
        level: lvlInt,
        msg: msg,
        time: options.localDate ? formatLocalDate() : new Date().toISOString(),
        src: getCaller3Info(),        
        levelName: levelNames[lvlInt],
    };

    if (obj instanceof RawValue) {
        log.raw = obj.raw;
    }

    stack = stack && options.root ? stack.replace(new RegExp(options.root, 'g'), '{root}') : stack;
    
    if (stack) {
        log.stack = stack;
    }

    log.v = options.v;
    log.src.r = options.root;

    return src.write(JSON.stringify(log) + os.EOL);
}
1035442
private static void writeToLog(Logger logger, Level level, String pattern, Exception exception) {
    if (level == Level.ERROR) {
      logger.error(pattern, exception);
    } else if (level == Level.INFO) {
      logger.info(pattern);
    } else if (level == Level.DEBUG) {
      logger.debug(pattern);
    }
  }
413355
function writeLog(entries){
    var output = '';

    _.each(entries, function(entry){
        output += entry + '\n';
    });

    return fs.appendFileAsync(this.config.path, output);
}
1348730
private void writeXAResource(Definition def, Writer out, int indent) throws IOException
   {
      writeWithIndent(out, indent, "/**\n");
      writeWithIndent(out, indent, " * This method is called by the application server during crash recovery.\n");
      writeWithIndent(out, indent, " *\n");
      writeWithIndent(out, indent, " * @param specs An array of ActivationSpec JavaBeans \n");
      writeWithIndent(out, indent, " * @throws ResourceException generic exception \n");
      writeWithIndent(out, indent, " * @return An array of XAResource objects\n");
      writeWithIndent(out, indent, " */\n");

      writeWithIndent(out, indent, "public XAResource[] getXAResources(ActivationSpec[] specs)\n");
      writeWithIndent(out, indent + 1, "throws ResourceException");
      writeLeftCurlyBracket(out, indent);
      writeLogging(def, out, indent + 1, "trace", "getXAResources", "specs.toString()");
      writeWithIndent(out, indent + 1, "return null;");
      writeRightCurlyBracket(out, indent);
      writeEol(out);
   }
437645
@Override
    public void write(int idx) throws IOException {
        try {
            beforeWrite(1);
            out.write(idx);
            afterWrite(1);
        } catch (IOException e) {
            handleIOException(e);
        }
    }
1169278
def log_writer():
    ''''''
    while True:
        mpstate.logfile_raw.write(bytearray(mpstate.logqueue_raw.get()))
        timeout = time.time() + 10
        while not mpstate.logqueue_raw.empty() and time.time() < timeout:
            mpstate.logfile_raw.write(mpstate.logqueue_raw.get())
        while not mpstate.logqueue.empty() and time.time() < timeout:
            mpstate.logfile.write(mpstate.logqueue.get())
        if mpstate.settings.flushlogs or time.time() >= timeout:
            mpstate.logfile.flush()
            mpstate.logfile_raw.flush()
858546
static void printToLogFile(String str) {
    try (BufferedWriter bw = new BufferedWriter(new FileWriter(getLogPath(), true))) {
      bw.write(str + logLineBreak);
    } catch (Throwable t) {
      showError(t);
    }
  }
435379
def write(self, msg, level=logging.INFO):
        
        if msg is not None and len(msg.strip()) > 0:
            self.logger.log(level, msg)
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')
49649
public static Object write(Context cx, Scriptable thisObj,
                               Object[] args, Function funObj)
    {
        return doPrint(args, funObj, false);
    }
402861
function writeLog(type, category){
    return function(messages) {
        var funcs = [];

        _.each(messages, function(message){
            funcs.push(this.client.logAsync(message, [type, category]));
        }.bind(this));

        return BB.all(funcs);
    };

}
199559
@Override
	public synchronized void dump(boolean close)
	{
		if (logfile != null)
		{
			PrintWriter writer = null;

			try
			{
				writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(logfile, true), "UTF-8"));
			} catch (FileNotFoundException e)
			{
				e.printStackTrace();
				return;
			} catch (UnsupportedEncodingException e)
			{
				e.printStackTrace();
				return;
			}

			for (RTMessage event : events)
			{
				writer.println(event.getMessage());
			}

			writer.flush();
			events.clear();

			writer.close();
		}
	}
150324
public String logMessage(String strTrxID, BaseMessage trxMessage, String strMessageInfoType, String strMessageProcessType, String strMessageStatus, String strContactType, String strPerson, String strMessageDescription, int iUserID, int iMessageReferenceID, Message message, String strDest)
    {
        Utility.getLogger().info("Sending message to URL: " + strDest);
        String strMessageFrom = null;
        String strMessageTo = null;
        String strContentType = null;
        String strContent = null;
        if (message != null)
        {
            try {
                Object objContent = message.getContent();
                strContentType = message.getContentType();
                Address[] rgstrMessageFrom = message.getFrom();
                if (rgstrMessageFrom != null) if (rgstrMessageFrom.length > 0)
                    strMessageFrom = rgstrMessageFrom[0].toString();
                Address[] rgstrMessageTo = message.getAllRecipients();
                if (rgstrMessageTo != null) if (rgstrMessageTo.length > 0)
                    strMessageTo = rgstrMessageTo[0].toString();
                if ((strMessageDescription == null) || (strMessageDescription.length() == 0))
                    strMessageDescription = message.getSubject();
                strContent = objContent.toString();
            } catch (IOException ex)    {
                ex.printStackTrace();
            } catch (MessagingException ex)    {
                ex.printStackTrace();
            }
        }
        // Be sure to call super!
        return super.logMessage(strTrxID, trxMessage, strMessageInfoType, strMessageProcessType, strMessageStatus, strMessageDescription, strContentType);
    }
1259089
function _logExecOutput(log, process) {
  let stdout = process.stdout || '';
  let stderr = process.stderr || '';

  if (process.platform === 'win32') {
    stdout = stdout.replace(/\r\n/g, '\n');
    stderr = stderr.replace(/\r\n/g, '\n');
  }

  if (stdout) {
    log.trace({ event: 'EXEC_SUCCESS', stdout: true }, stdout);
  }

  if (stderr) {
    log.trace({ event: 'EXEC_SUCCESS', stderr: true }, stderr);
  }

  if (!stdout && !stderr) {
    log.trace({ event: 'EXEC_SUCCESS' }, '');
  }
}