@Override
		public void write(int b) throws IOException {
			if (b == '\n' || b == '\r') {
				out.write(b);
				state = STATE_NOLINE;
			}
			else if (state == STATE_NOLINE) {
				startln();
				out.write(b);
				state = STATE_LINE;
			}
			else {
				out.write(b);
			}
		}
{@inheritDoc}

Parses each line and prepends the indentation as they are printed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/util/DbgTimer.java