# HG changeset patch # User Christian Hammond # Date 1061430602 0 # Node ID 1690791f0c7013f3de693e6280f89b0c3f5c1772 # Parent 4bc050b1af34d5236e0b5b1a25edb71702585620 [gaim-migrate @ 7057] Improved the debug commands for perl scripts. committer: Tailor Script diff -r 4bc050b1af34 -r 1690791f0c70 plugins/perl/common/Gaim.xs --- a/plugins/perl/common/Gaim.xs Thu Aug 21 01:46:00 2003 +0000 +++ b/plugins/perl/common/Gaim.xs Thu Aug 21 01:50:02 2003 +0000 @@ -14,13 +14,60 @@ gaim_perl_timeout_add(plugin, seconds, func, arg); void -debug(category, string) +debug(level, category, string) + const char *level + const char *category + const char *string +CODE: + if (!strcmp(level, "misc")) + gaim_debug(GAIM_DEBUG_MISC, category, string); + else if (!strcmp(level, "info")) + gaim_debug(GAIM_DEBUG_INFO, category, string); + else if (!strcmp(level, "warning")) + gaim_debug(GAIM_DEBUG_WARNING, category, string); + else if (!strcmp(level, "error")) + gaim_debug(GAIM_DEBUG_ERROR, category, string); + else if (!strcmp(level, "fatal")) + gaim_debug(GAIM_DEBUG_FATAL, category, string); + else + croak("Unknown debug level type '%s'", level); + +void +debug_misc(category, string) + const char *category + const char *string +CODE: + gaim_debug(GAIM_DEBUG_MISC, category, string); + +void +debug_info(category, string) const char *category const char *string CODE: gaim_debug(GAIM_DEBUG_INFO, category, string); void +debug_warning(category, string) + const char *category + const char *string +CODE: + gaim_debug(GAIM_DEBUG_WARNING, category, string); + +void +debug_error(category, string) + const char *category + const char *string +CODE: + gaim_debug(GAIM_DEBUG_ERROR, category, string); + +void +debug_fatal(category, string) + const char *category + const char *string +CODE: + gaim_debug(GAIM_DEBUG_FATAL, category, string); + +void deinit() PREINIT: GList *l;