1Glib::Log(3) User Contributed Perl Documentation Glib::Log(3)
2
3
4
6 Glib::Log - A flexible logging mechanism
7
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->debug ($domain, $message)
18 • $domain (string or undef)
19
20 • $message (string)
21
22 Glib::Log::default_handler ($log_domain, $log_level, $message, ...)
23 • $log_domain (string)
24
25 • $log_level (scalar)
26
27 • $message (string)
28
29 • ... (list) possible "userdata" argument ignored
30
31 The arguments are the same as taken by the function for set_handler or
32 set_default_handler.
33
34 prev_log_func = Glib::Log->set_default_handler ($log_func, $user_data)
35 • $log_func (subroutine) handler function or undef
36
37 • $user_data (scalar)
38
39 Install log_func as the default log handler. log_func is called for
40 anything which doesn't otherwise have a handler (either
41 Glib::Log->set_handler, or the Glib::xsapi gperl_handle_logs_for),
42
43 &$log_func ($log_domain, $log_levels, $message, $user_data)
44
45 where $log_domain is a string, and $log_levels is a Glib::LogLevelFlags
46 of level and flags being reported.
47
48 If log_func is \&Glib::Log::default_handler or undef then Glib's
49 default handler is set.
50
51 The return value from "set_default_handler" is the previous handler.
52 This is \&Glib::Log::default_handler for Glib's default, otherwise a
53 Perl function previously installed. If the handler is some other non-
54 Perl function then currently the return is undef, but perhaps that will
55 change to some wrapped thing, except that without associated userdata
56 there's very little which could be done with it (it couldn't be
57 reinstalled later without its userdata).
58
59 Since: glib 2.6
60
61 Glib->error ($domain, $message)
62 • $domain (string or undef)
63
64 • $message (string)
65
66 scalar = Glib::Log->set_fatal_mask ($log_domain, $fatal_mask)
67 • $log_domain (string)
68
69 • $fatal_mask (scalar)
70
71 integer = Glib::Log->set_handler ($log_domain, $log_levels, $log_func,
72 $user_data=undef)
73 • $log_domain (string or undef) name of the domain to handle with
74 this callback.
75
76 • $log_levels (Glib::LogLevelFlags) log levels to handle with this
77 callback
78
79 • $log_func (subroutine) handler function
80
81 • $user_data (scalar)
82
83 $log_func will be called as
84
85 &$log_func ($log_domain, $log_levels, $message, $user_data);
86
87 where $log_domain is the name requested and $log_levels is a
88 Glib::LogLevelFlags of level and flags being reported.
89
90 Glib->info ($domain, $message)
91 • $domain (string or undef)
92
93 • $message (string)
94
95 Glib->log ($log_domain, $log_level, $message)
96 • $log_domain (string or undef)
97
98 • $log_level (scalar)
99
100 • $message (string)
101
102 Glib->message ($domain, $message)
103 • $domain (string or undef)
104
105 • $message (string)
106
107 Glib::Log->remove_handler ($log_domain, $handler_id)
108 • $log_domain (string or undef)
109
110 • $handler_id (integer) as returned by "set_handler"
111
112 Glib->warning ($domain, $message)
113 • $domain (string or undef)
114
115 • $message (string)
116
118 flags Glib::LogLevelFlags
119 • 'recursion' / 'G_LOG_FLAG_RECURSION'
120
121 • 'fatal' / 'G_LOG_FLAG_FATAL'
122
123 • 'error' / 'G_LOG_LEVEL_ERROR'
124
125 • 'critical' / 'G_LOG_LEVEL_CRITICAL'
126
127 • 'warning' / 'G_LOG_LEVEL_WARNING'
128
129 • 'message' / 'G_LOG_LEVEL_MESSAGE'
130
131 • 'info' / 'G_LOG_LEVEL_INFO'
132
133 • 'debug' / 'G_LOG_LEVEL_DEBUG'
134
135 • 'fatal-mask' / 'G_LOG_FATAL_MASK'
136
138 Glib
139
141 Copyright (C) 2003-2011 by the gtk2-perl team.
142
143 This software is licensed under the LGPL. See Glib for a full notice.
144
145
146
147perl v5.34.0 2021-07-22 Glib::Log(3)