comparison src/debug.c @ 10448:6a20307ef8dc

[gaim-migrate @ 11713] Fix the problem with accounts.xml being loaded before the plugins were probed. This fixes the Yahoo! crash mentioned by the guy on gaim-devel and a guy in #gaim, and a few other obscure problems. Plugins are probed* by the core now instead of the UI. Less work for UI implementors means less code duplication and makes it more likely someone will write a new UI. *Probing loads the PRPLs and any loader plugins (perl, tcl, etc.), and makes plugin information available everywhere else. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 29 Dec 2004 22:48:59 +0000
parents 2ac21bf20e04
children 50224ac8184d
comparison
equal deleted inserted replaced
10447:6feef0a9098a 10448:6a20307ef8dc
49 g_return_if_fail(level != GAIM_DEBUG_ALL); 49 g_return_if_fail(level != GAIM_DEBUG_ALL);
50 g_return_if_fail(format != NULL); 50 g_return_if_fail(format != NULL);
51 51
52 if (debug_enabled) { 52 if (debug_enabled) {
53 gchar *arg_s, *ts_s; 53 gchar *arg_s, *ts_s;
54 gboolean timestamps;
55 54
56 arg_s = g_strdup_vprintf(format, args); 55 arg_s = g_strdup_vprintf(format, args);
57 56
58 timestamps = gaim_prefs_get_bool("/core/debug/timestamps");; 57 if ((category != NULL) &&
59 if ((category != NULL) && (timestamps)) { 58 (gaim_prefs_exists("/core/debug/timestamps")) &&
59 (gaim_prefs_get_bool("/core/debug/timestamps"))) {
60 gchar mdate[64]; 60 gchar mdate[64];
61 61
62 time_t mtime = time(NULL); 62 time_t mtime = time(NULL);
63 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); 63 strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime));
64 ts_s = g_strdup_printf("(%s) ", mdate); 64 ts_s = g_strdup_printf("(%s) ", mdate);