Ross McFarland > Glib-1.043 > GLog.xs

Download:
Gtk2-Perl/Glib-1.043.tar.gz

Annotate this POD

CPAN RT

New  3
Open  3
View/Report Bugs
Source  

GLog

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...]

gint gperl_handle_logs_for (const gchar * log_domain)

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.

syntax highlighting: