Optimize Firmware Run-time testing effort

In testing the pre-release version I’m usually use UART to log data form the MCU. So i can ensure all parts are working together correctly. I have to write special logging code for each testing situation.

Is there any library or tool that can automate logging of MCU data during Run-time testing ?