Added the possibility to define macros to hijack the debug/output/error messages.