Mercurial > pidgin.yaz
diff libpurple/debug.c @ 16995:8d94cf688009
Force timestamps always on for debug log and debug window. Making this
optional seems pointless and can significantly reduce the usefulness of
debug logs for things where timestamps would be useful but the user turned
them off.
| author | Stu Tomlinson <stu@nosnilmot.com> |
|---|---|
| date | Thu, 10 May 2007 01:33:20 +0000 |
| parents | 4999bbc52881 |
| children | da6e87c14cea |
line wrap: on
line diff
--- a/libpurple/debug.c Wed May 09 23:44:49 2007 +0000 +++ b/libpurple/debug.c Thu May 10 01:33:20 2007 +0000 @@ -61,18 +61,12 @@ if (debug_enabled) { gchar *ts_s; - - if ((category != NULL) && - (purple_prefs_exists("/purple/debug/timestamps")) && - (purple_prefs_get_bool("/purple/debug/timestamps"))) { - const char *mdate; + const char *mdate; + time_t mtime = time(NULL); - time_t mtime = time(NULL); - mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); - ts_s = g_strdup_printf("(%s) ", mdate); - } else { - ts_s = g_strdup(""); - } + + mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime)); + ts_s = g_strdup_printf("(%s) ", mdate); if (category == NULL) g_print("%s%s", ts_s, arg_s); @@ -189,11 +183,4 @@ void purple_debug_init(void) { - purple_prefs_add_none("/purple/debug"); - - /* - * This pref is currently used by both the console - * output and the debug window output. - */ - purple_prefs_add_bool("/purple/debug/timestamps", FALSE); }
