private synchronized void writeLog(String level, String text, Throwable throwable) {
		if (logWriter == null) {
			return;
		}
		writeLog(level, chopLines(text));
		for (StackTraceElement element : throwable.getStackTrace()) {
			writeLog(level + " " + element.toString());
		}
		logWriter.flush();
	}
Custom headless error logger which is used when log4j is disabled.
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessErrorLogger.java