Using different putch() function in a library
You could create a custom PUTCH that decides at run time what to do with the byte.  This would be based on a global setting you maintain.  You'd change the global setting to route characters to wherever you want them to go at the time.  One of them can be a customer's routine, although it would have to be called something other than PUTCH.