Mercurial > pidgin.yaz
changeset 7520:f25119847c5b
[gaim-migrate @ 8133]
If debug ops have not been set fall back to printf in gaim_debug
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sun, 16 Nov 2003 01:46:19 +0000 |
parents | c57206d8753f |
children | 8beec54d1855 |
files | src/debug.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/debug.c Sun Nov 16 01:45:18 2003 +0000 +++ b/src/debug.c Sun Nov 16 01:46:19 2003 +0000 @@ -21,6 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "debug.h" +#include <stdio.h> #include <stdlib.h> #include <glib.h> @@ -39,6 +40,12 @@ if (ops != NULL && ops->print != NULL) ops->print(level, category, format, args); + else { + /* fallback for pre ops init period */ + char *str = g_strdup_vprintf(format, args); + printf("%s%s%s", category?category:"", category?": ":"",str); + g_free(str); + } } void