Codex

Glib::Log

Section: User Contributed Perl Documentation (3pm)

Updated: 2014-08-29

Index?action=index Return to Main Contents


NAME

Glib::Log - A flexible logging mechanism

METHODS

scalar = Glib::Log->set_always_fatal ($fatal_mask)

(scalar):

Glib->critical ($domain, $message)

(string or undef):
(string):

Glib::Log::default_handler ($log_domain, $log_level, $message, ...)

(string):
(scalar):
(string):
... (list) possible ``userdata'' argument ignored:

The arguments are the same as taken by the function for set_handler or set_default_handler.

prev_log_func = Glib::Log->set_default_handler ($log_func, $user_data)

(subroutine) handler function or undef:
(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),

where is a string, and 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 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)

(string or undef):
(string):

scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask)

(string):
(scalar):

integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func, $user_data=undef)

(string or undef) name of the domain to handle with this callback.:
(Glib::LogLevelFlags) log levels to handle with this callback:
(subroutine) handler function:
(scalar):
will be called as
where is the name requested and is a Glib::LogLevelFlags of level and flags being reported.

Glib->log ($log_domain, $log_level, $message)

(string or undef):
(scalar):
(string):

Glib->message ($domain, $message)

(string or undef):
(string):

Glib::Log->remove_handler ($log_domain, $handler_id)

(string or undef):
(integer) as returned by :

Glib->warning ($domain, $message)

(string or undef):
(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

COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Glib for a full notice.


Index

NAME

METHODS

scalar = Glib::Log->set_always_fatal ($fatal_mask)

Glib->critical ($domain, $message)

Glib::Log::default_handler ($log_domain, $log_level, $message, ...)

prev_log_func = Glib::Log->set_default_handler ($log_func, $user_data)

Glib->error ($domain, $message)

scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask)

integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func, $user_data=undef)

Glib->log ($log_domain, $log_level, $message)

Glib->message ($domain, $message)

Glib::Log->remove_handler ($log_domain, $handler_id)

Glib->warning ($domain, $message)

ENUMS AND FLAGS

flags Glib::LogLevelFlags

SEE ALSO

COPYRIGHT