GLib has a message logging mechanism which it uses for the g_return_if_fail() assertion macros, etc.; it's really versatile and allows you to set various levels to be fatal and whatnot. Libraries use these for various types of message reporting.
These functions let you reroute those messages from Perl. By default, the warning, critical, and message levels go through perl's warn(), and fatal ones go through croak(). [i'm not sure that these get to croak() before GLib abort()s on them...]
Route all g_logs for log_domain through gperl's log handling. You'll have to register domains in each binding submodule, because there's no way we can know about them down here.
And, technically, this traps all the predefined log levels, not any of the ones you (or your library) may define for yourself.