examples: Add example program showing enabling debugging and capturing log messages.