register_printf_function is deprecated; you should use register_printf_specifier instead.
I strongly advise against using either since both are not only non-portable, but also break any compiler support for getting you warnings when you're using it wrong.