1Glib::Log(3)          User Contributed Perl Documentation         Glib::Log(3)
2
3
4

NAME

6       Glib::Log -  A flexible logging mechanism
7

METHODS

9   scalar = Glib::Log->set_always_fatal ($fatal_mask)
10       ·   $fatal_mask (scalar)
11
12   Glib->critical ($domain, $message)
13       ·   $domain (string or undef)
14
15       ·   $message (string)
16
17   Glib::Log::default_handler ($log_domain, $log_level, $message, ...)
18       ·   $log_domain (string)
19
20       ·   $log_level (scalar)
21
22       ·   $message (string)
23
24       ·   ... (list) possible "userdata" argument ignored
25
26       The arguments are the same as taken by the function for set_handler or
27       set_default_handler.
28
29   prev_log_func = Glib::Log->set_default_handler ($log_func, $user_data)
30       ·   $log_func (subroutine) handler function or undef
31
32       ·   $user_data (scalar)
33
34       Install log_func as the default log handler.  log_func is called for
35       anything which doesn't otherwise have a handler (either
36       Glib::Log->set_handler, or the Glib::xsapi gperl_handle_logs_for),
37
38           &$log_func ($log_domain, $log_levels, $message, $user_data)
39
40       where $log_domain is a string, and $log_levels is a Glib::LogLevelFlags
41       of level and flags being reported.
42
43       If log_func is \&Glib::Log::default_handler or undef then Glib's
44       default handler is set.
45
46       The return value from "set_default_handler" is the previous handler.
47       This is \&Glib::Log::default_handler for Glib's default, otherwise a
48       Perl function previously installed.  If the handler is some other non-
49       Perl function then currently the return is undef, but perhaps that will
50       change to some wrapped thing, except that without associated userdata
51       there's very little which could be done with it (it couldn't be
52       reinstalled later without its userdata).
53
54       Since: glib 2.6
55
56   Glib->error ($domain, $message)
57       ·   $domain (string or undef)
58
59       ·   $message (string)
60
61   scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask)
62       ·   $log_domain (string)
63
64       ·   $fatal_mask (scalar)
65
66   integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func,
67       $user_data=undef)
68       ·   $log_domain (string or undef) name of the domain to handle with
69           this callback.
70
71       ·   $log_levels (Glib::LogLevelFlags) log levels to handle with this
72           callback
73
74       ·   $log_func (subroutine) handler function
75
76       ·   $user_data (scalar)
77
78       $log_func will be called as
79
80           &$log_func ($log_domain, $log_levels, $message, $user_data);
81
82       where $log_domain is the name requested and $log_levels is a
83       Glib::LogLevelFlags of level and flags being reported.
84
85   Glib->log ($log_domain, $log_level, $message)
86       ·   $log_domain (string or undef)
87
88       ·   $log_level (scalar)
89
90       ·   $message (string)
91
92   Glib->message ($domain, $message)
93       ·   $domain (string or undef)
94
95       ·   $message (string)
96
97   Glib::Log->remove_handler ($log_domain, $handler_id)
98       ·   $log_domain (string or undef)
99
100       ·   $handler_id (integer) as returned by "set_handler"
101
102   Glib->warning ($domain, $message)
103       ·   $domain (string or undef)
104
105       ·   $message (string)
106

ENUMS AND FLAGS

108   flags Glib::LogLevelFlags
109       ·   'recursion' / 'G_LOG_FLAG_RECURSION'
110
111       ·   'fatal' / 'G_LOG_FLAG_FATAL'
112
113       ·   'error' / 'G_LOG_LEVEL_ERROR'
114
115       ·   'critical' / 'G_LOG_LEVEL_CRITICAL'
116
117       ·   'warning' / 'G_LOG_LEVEL_WARNING'
118
119       ·   'message' / 'G_LOG_LEVEL_MESSAGE'
120
121       ·   'info' / 'G_LOG_LEVEL_INFO'
122
123       ·   'debug' / 'G_LOG_LEVEL_DEBUG'
124
125       ·   'fatal-mask' / 'G_LOG_FATAL_MASK'
126

SEE ALSO

128       Glib
129
131       Copyright (C) 2003-2011 by the gtk2-perl team.
132
133       This software is licensed under the LGPL.  See Glib for a full notice.
134
135
136
137perl v5.30.0                      2019-07-29                      Glib::Log(3)
Impressum