Oleg's solution seems OK.
I have found in many cases that it is better to add the new entries to the begining of the string, this way the newest entry is always on top and you never need to scroll to see it. (Especially useful for continuous logging applications.)
I have modified your example to offer both possibilities. You pick!