I seem to have a similar request for my project.
In my huge C code base we printed:
Informational messages,
Warning messages,
Error messages.

All of the obviously doen with printf().
So we created our own version that sended out signals
with the corresponding ascii line as an argument.
I was lucky that we had our own routines for printing
but I guess some nifty #define can do the trick/ or a big grep.

Anyway the signal solution is realy neat. It's thread safe and does
not add a lot of overhead. I tested it with several million of messages
and there was not a big impact on the performance.

You do need to take care of the C -> C++ wrappers though.