private final void onEncodeLogEvent(int type, boolean clear, String cmdText, String infoText, String progressText) {
		if (clear) {
			// Clear
			for (int i = 0; i < this.advanced.logs[type].length; ++i) {
				this.advanced.logs[type][i].setText("");
			}
		}
		if (cmdText != null) {
			String separator = "----------------------------------------\n";
			String current;
			for (int i = 0; i < this.advanced.logs[type].length; ++i) {
				current = this.advanced.logs[type][i].getText();
				if (current.length() > i && current.charAt(current.length() - 1) != '\n') {
					this.advanced.logs[type][i].append("\n");
				}
				this.advanced.logs[type][i].append(separator);
				this.advanced.logs[type][i].append(cmdText);
				this.advanced.logs[type][i].append("\n");
				this.advanced.logs[type][i].append(separator);
			}
		}
		if (infoText != null) {
			this.advanced.logs[type][0].append(infoText);
		}
		if (progressText != null) {
			this.advanced.logs[type][1].append(progressText);
		}
	}