Glib::Log(3)
okay so this is Glib::Log(3), straight outta the User Contributed Perl Documentation, and we're gonna make logging make sense together π«Ά
πΈ NAME πΈ
Glib::Log β a flexible logging mechanism, fr fr π
π METHODS π
π scalar = Glib::Log->set_always_fatal ($fatal_mask) π
$fatal_mask(scalar)
π₯ Glib->critical ($domain, $message) π₯
$domain(string or undef)$message(string)
π Glib->debug ($domain, $message) π
$domain(string or undef)$message(string)
π§ Glib::Log::default_handler ($log_domain, $log_level, $message, ...) π§
$log_domain(string)$log_level(scalar)$message(string)...(list) β possible "userdata" argument ignored
The arguments are the same as taken by the function for set_handler or set_default_handler, bestie π
π prev_log_func = Glib::Log->set_default_handler ($log_func, $user_data) π
$log_func(subroutine) handler function or undef$user_data(scalar)
Install log_func as the default log handler. log_func is called for anything which doesn't otherwise have a handler (either Glib::Log->set_handler, or the Glib::xsapi gperl_handle_logs_for), like this:
&$log_func ($log_domain, $log_levels, $message, $user_data)
where $log_domain is a string, and $log_levels is a Glib::LogLevelFlags of level and flags being reported.
If log_func is \&Glib::Log::default_handler or undef then Glib's default handler is set.
The return value from set_default_handler is the previous handler. This is \&Glib::Log::default_handler for Glib's default, otherwise a Perl function previously installed. If the handler is some other non-Perl function then currently the return is undef, but perhaps that will change to some wrapped thing, except that without associated userdata there's very little which could be done with it (it couldn't be reinstalled later without its userdata). π«
Since: glib 2.6
π¨ Glib->error ($domain, $message) π¨
$domain(string or undef)$message(string)
β‘ scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask) β‘
$log_domain(string)$fatal_mask(scalar)
π οΈ integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func, $user_data=undef) π οΈ
$log_domain(string or undef) name of the domain to handle with this callback.$log_levels(Glib::LogLevelFlags) log levels to handle with this callback$log_func(subroutine) handler function$user_data(scalar)
$log_func will be called as:
&$log_func ($log_domain, $log_levels, $message, $user_data);
where $log_domain is the name requested and $log_levels is a Glib::LogLevelFlags of level and flags being reported. periodt β¨
βΉοΈ Glib->info ($domain, $message) βΉοΈ
$domain(string or undef)$message(string)
π Glib->log ($log_domain, $log_level, $message) π
$log_domain(string or undef)$log_level(scalar)$message(string)
π¬ Glib->message ($domain, $message) π¬
$domain(string or undef)$message(string)
π§Ή Glib::Log->remove_handler ($log_domain, $handler_id) π§Ή
$log_domain(string or undef)$handler_id(integer) as returned by"set_handler"
β οΈ Glib->warning ($domain, $message) β οΈ
$domain(string or undef)$message(string)
π¦ ENUMS AND FLAGS π¦
β¨ flags Glib::LogLevelFlags β¨
'recursion'/'G_LOG_FLAG_RECURSION''fatal'/'G_LOG_FLAG_FATAL''error'/'G_LOG_LEVEL_ERROR''critical'/'G_LOG_LEVEL_CRITICAL''warning'/'G_LOG_LEVEL_WARNING''message'/'G_LOG_LEVEL_MESSAGE''info'/'G_LOG_LEVEL_INFO''debug'/'G_LOG_LEVEL_DEBUG''fatal-mask'/'G_LOG_FATAL_MASK'
π SEE ALSO π
Glib β go peek, bestie, it's giving essential π
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Glib for a full notice.
okay that's the whole page, mwah π. signed off with perl v5.42.0, dated 2023-09-05, and it's Glib::Log(3) the whole way down π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms