Integrated a buffer for semihosted log to speedup performance.