libpurple/debug.c

Sat, 24 Nov 2018 08:30:47 +0000

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 24 Nov 2018 08:30:47 +0000
changeset 39320
c412d5619fe2
parent 38643
cb7fbf08fcb7
child 39913
ce96d4639dc7
permissions
-rw-r--r--

Merged in EionRobb/pidgin/http-fixes (pull request #413)

Fix HTTP errors from static analysis

Approved-by: Mike Ruprecht <cmaiku@gmail.com>
Approved-by: Gary Kramlich <grim@reaperworld.com>

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* purple
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7525
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7525
diff changeset
5 * source distribution.
6483
d12ecdf8e489 [gaim-migrate @ 6997]
Christian Hammond <chipx86@chipx86.com>
parents: 5212
diff changeset
6 *
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * (at your option) any later version.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * GNU General Public License for more details.
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 17318
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
28981
4e3922ab4844 Include 'internal.h' before all other headers to make some non-gcc compilers happy.
Paul Aurich <darkrain42@pidgin.im>
parents: 27542
diff changeset
21 #include "internal.h"
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #include "debug.h"
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
23 #include "prefs.h"
13105
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 11504
diff changeset
24 #include "util.h"
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
26 static PurpleDebugUi *debug_ui = NULL;
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
28 /*
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
29 * This determines whether debug info should be written to the
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
30 * console or not.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
31 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
32 * It doesn't make sense to make this a normal Purple preference
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
33 * because it's a command line option. This will always be FALSE,
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
34 * unless the user explicitly started the UI with the -d flag.
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
35 * It doesn't matter what this value was the last time Purple was
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
36 * started, so it doesn't make sense to save it in prefs.
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
37 */
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
38 static gboolean debug_enabled = FALSE;
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
39
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
40 /*
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
41 * These determine whether verbose or unsafe debugging are desired. I
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
42 * don't want to make these purple preferences because their values should
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
43 * not be remembered across instances of the UI.
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
44 */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
45 static gboolean debug_verbose = FALSE;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
46 static gboolean debug_unsafe = FALSE;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
47
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
48 static gboolean debug_colored = FALSE;
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
49
11504
eabc708c2ea9 [gaim-migrate @ 13749]
Richard Laager <rlaager@pidgin.im>
parents: 11256
diff changeset
50 static void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
51 purple_debug_vargs(PurpleDebugLevel level, const char *category,
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 const char *format, va_list args)
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 {
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
54 PurpleDebugUi *ops;
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
55 PurpleDebugUiInterface *iface;
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
56 char *arg_s = NULL;
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
58 g_return_if_fail(level != PURPLE_DEBUG_ALL);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 g_return_if_fail(format != NULL);
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
61 ops = purple_debug_get_ui();
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
62 if (!ops)
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
63 return;
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
64 iface = PURPLE_DEBUG_UI_GET_IFACE(ops);
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
65 if (!iface)
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
66 return;
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
67
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
68 if (!debug_enabled && ((iface == NULL) || (iface->print == NULL) ||
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
69 (iface->is_enabled && !iface->is_enabled(ops, level, category))))
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
70 return;
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
71
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
72 arg_s = g_strdup_vprintf(format, args);
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
73 g_strchomp(arg_s); /* strip trailing linefeeds */
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
74
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
75 if (debug_enabled) {
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
76 gchar *ts_s;
17040
cb33027a36e4 Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16478
diff changeset
77 const char *mdate;
cb33027a36e4 Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16478
diff changeset
78 time_t mtime = time(NULL);
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
79 const gchar *format_pre, *format_post;
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
80
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
81 format_pre = "";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
82 format_post = "";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
83
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
84 if (!debug_colored)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
85 format_pre = "";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
86 else if (level == PURPLE_DEBUG_MISC)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
87 format_pre = "\033[0;37m";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
88 else if (level == PURPLE_DEBUG_INFO)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
89 format_pre = "";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
90 else if (level == PURPLE_DEBUG_WARNING)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
91 format_pre = "\033[0;33m";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
92 else if (level == PURPLE_DEBUG_ERROR)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
93 format_pre = "\033[1;31m";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
94 else if (level == PURPLE_DEBUG_FATAL)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
95 format_pre = "\033[1;33;41m";
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
96
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
97 if (format_pre[0] != '\0')
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
98 format_post = "\033[0m";
17040
cb33027a36e4 Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16478
diff changeset
99
cb33027a36e4 Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16478
diff changeset
100 mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime));
cb33027a36e4 Force timestamps always on for debug log and debug window. Making this
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 16478
diff changeset
101 ts_s = g_strdup_printf("(%s) ", mdate);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
102
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
103 if (category == NULL)
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
104 g_print("%s%s%s%s\n", format_pre, ts_s, arg_s, format_post);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
105 else
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
106 g_print("%s%s%s: %s%s\n", format_pre, ts_s, category, arg_s, format_post);
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
107
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
108 g_free(ts_s);
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
109 }
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
110
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
111 if (iface != NULL && iface->print != NULL)
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
112 iface->print(ops, level, category, arg_s);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113
13988
a178d3dcbb7f [gaim-migrate @ 16445]
Mark Doliner <markdoliner@pidgin.im>
parents: 13105
diff changeset
114 g_free(arg_s);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 }
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
118 purple_debug(PurpleDebugLevel level, const char *category,
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 const char *format, ...)
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 {
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 va_list args;
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
123 g_return_if_fail(level != PURPLE_DEBUG_ALL);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 g_return_if_fail(format != NULL);
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
127 purple_debug_vargs(level, category, format, args);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 va_end(args);
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 }
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
132 purple_debug_misc(const char *category, const char *format, ...)
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
133 {
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
134 va_list args;
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
135
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
136 g_return_if_fail(format != NULL);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
137
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
138 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
139 purple_debug_vargs(PURPLE_DEBUG_MISC, category, format, args);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
140 va_end(args);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
141 }
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
142
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
143 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
144 purple_debug_info(const char *category, const char *format, ...)
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
145 {
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
146 va_list args;
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
147
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
148 g_return_if_fail(format != NULL);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
149
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
150 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
151 purple_debug_vargs(PURPLE_DEBUG_INFO, category, format, args);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
152 va_end(args);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
153 }
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
154
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
155 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
156 purple_debug_warning(const char *category, const char *format, ...)
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
157 {
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
158 va_list args;
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
159
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
160 g_return_if_fail(format != NULL);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
161
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
162 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
163 purple_debug_vargs(PURPLE_DEBUG_WARNING, category, format, args);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
164 va_end(args);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
165 }
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
166
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
167 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
168 purple_debug_error(const char *category, const char *format, ...)
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
169 {
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
170 va_list args;
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
171
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
172 g_return_if_fail(format != NULL);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
173
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
174 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
175 purple_debug_vargs(PURPLE_DEBUG_ERROR, category, format, args);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
176 va_end(args);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
177 }
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
178
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
179 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
180 purple_debug_fatal(const char *category, const char *format, ...)
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
181 {
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
182 va_list args;
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
183
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
184 g_return_if_fail(format != NULL);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
185
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
186 va_start(args, format);
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
187 purple_debug_vargs(PURPLE_DEBUG_FATAL, category, format, args);
6721
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
188 va_end(args);
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
189 }
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
190
41d2d86860f3 [gaim-migrate @ 7248]
Christian Hammond <chipx86@chipx86.com>
parents: 6483
diff changeset
191 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
192 purple_debug_set_enabled(gboolean enabled)
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
193 {
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
194 debug_enabled = enabled;
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
195 }
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
196
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
197 gboolean
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
198 purple_debug_is_enabled()
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
199 {
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
200 return debug_enabled;
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
201 }
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
202
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
203 void
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
204 purple_debug_set_ui(PurpleDebugUi *ops)
35572
5c4846317f2f Box the *UiOps structures
Ankit Vani <a@nevitus.org>
parents: 35454
diff changeset
205 {
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
206 g_set_object(&debug_ui, ops);
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 }
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
209 gboolean
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
210 purple_debug_is_verbose()
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
211 {
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
212 return debug_verbose;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
213 }
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
214
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
215 void
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
216 purple_debug_set_verbose(gboolean verbose)
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
217 {
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
218 debug_verbose = verbose;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
219 }
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
220
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
221 gboolean
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
222 purple_debug_is_unsafe()
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
223 {
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
224 return debug_unsafe;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
225 }
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
226
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
227 void
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
228 purple_debug_set_unsafe(gboolean unsafe)
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
229 {
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
230 debug_unsafe = unsafe;
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
231 }
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
232
34296
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
233 void
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
234 purple_debug_set_colored(gboolean colored)
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
235 {
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
236 debug_colored = colored;
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
237 }
d31a4f3b547e Debug log: optional colored output and no need for add linefeed at the end of each message
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 32438
diff changeset
238
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
239 PurpleDebugUi *
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
240 purple_debug_get_ui(void)
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241 {
38643
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
242 return debug_ui;
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
243 }
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
244
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
245 G_DEFINE_INTERFACE(PurpleDebugUi, purple_debug_ui, G_TYPE_OBJECT);
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
246
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
247 static void
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
248 purple_debug_ui_default_init(PurpleDebugUiInterface *iface)
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
249 {
cb7fbf08fcb7 Convert PurpleDebugUiOps into an interface.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 35597
diff changeset
250 /* add properties and signals to the interface here */
5212
ad90ea13028b [gaim-migrate @ 5582]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 }
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
252
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
253 void
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
254 purple_debug_init(void)
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
255 {
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
256 /* Read environment variables once per init */
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
257 if(g_getenv("PURPLE_UNSAFE_DEBUG"))
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
258 purple_debug_set_unsafe(TRUE);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
259
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
260 if(g_getenv("PURPLE_VERBOSE_DEBUG"))
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
261 purple_debug_set_verbose(TRUE);
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
262
17318
ce44d0f8095d Un-break the API so the next release doesn't have to be 3.0.0 :)
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 17040
diff changeset
263 purple_prefs_add_none("/purple/debug");
10307
f3ba80364053 [gaim-migrate @ 11497]
Mark Doliner <markdoliner@pidgin.im>
parents: 8046
diff changeset
264 }
27542
a7acdc4ba23f Move the handling of PURPLE_UNSAFE_DEBUG to purple_debug_init(). Also add
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 20147
diff changeset
265

mercurial