Mercurial > pidgin
comparison src/debug.c @ 7525:7398a8d6862d
[gaim-migrate @ 8138]
Printing to the console if no debug ops are set will cause problems. A
different method should be thought out.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sun, 16 Nov 2003 01:55:59 +0000 |
| parents | f25119847c5b |
| children | fa6395637e2c |
comparison
equal
deleted
inserted
replaced
| 7524:5fbc055c15c7 | 7525:7398a8d6862d |
|---|---|
| 38 | 38 |
| 39 ops = gaim_debug_get_ui_ops(); | 39 ops = gaim_debug_get_ui_ops(); |
| 40 | 40 |
| 41 if (ops != NULL && ops->print != NULL) | 41 if (ops != NULL && ops->print != NULL) |
| 42 ops->print(level, category, format, args); | 42 ops->print(level, category, format, args); |
| 43 else { | |
| 44 /* fallback for pre ops init period */ | |
| 45 char *str = g_strdup_vprintf(format, args); | |
| 46 printf("%s%s%s", category?category:"", category?": ":"",str); | |
| 47 g_free(str); | |
| 48 } | |
| 49 } | 43 } |
| 50 | 44 |
| 51 void | 45 void |
| 52 gaim_debug(GaimDebugLevel level, const char *category, | 46 gaim_debug(GaimDebugLevel level, const char *category, |
| 53 const char *format, ...) | 47 const char *format, ...) |
