The Logger class is very easy to use!
In your main() place
hardware.StartLog(false);
(before starting your audio).
You can then output text and variable values with
hardware.PrintLine("mytext = %d", myvar);
or
hardware.PrintLine("mytext");
I even use it to export MIDI in XML form! (see OscPocketD - Portable music tool (sequencing drums and synths) - #13 by StaffanMelin).
I use GNU Linux (Debian) so I can mointor the serial port with
cu -l /dev/ttyACM0
and
screen /dev/ttyACM0
or for logging
screen -L -Logfile mylogfile.xml /dev/ttyACM0