This code is copied straight from Twisted FileLogObserver.emit code. Basically, it is responsible for the indented lines, when you see tracebacks and other multiline records in the logs.