psh, are you a man or a mouse?
I’ve never had any issues doing it like that, it’s certainly the easiest option but then whenever I’ve used such a component it’s always been for debugging purposes anyway.
I guess you could use the caret operations to select text at the start and replace with String::empty. That’d require that you store how long the removed strings are though, so you know much to chop off.
If you are really concerned with efficiency though, you’d be using a log viewing component that actually thought in lines rather than a giant string. Perhaps the CodeEditorComponent would be worth experimenting with? From the looks of it, it’d need you to store the log in a CodeDocument. It doesn’t look like CodeEditorComponent currently has a read-only mode yet though - if not, I’m sure it’d be a sensible request.