r15568 - gnucash/trunk/src/backend/file - log levelling.
Josh Sled
jsled at cvs.gnucash.org
Sun Feb 11 18:17:11 EST 2007
Author: jsled
Date: 2007-02-11 18:17:08 -0500 (Sun, 11 Feb 2007)
New Revision: 15568
Trac: http://svn.gnucash.org/trac/changeset/15568
Modified:
gnucash/trunk/src/backend/file/sixtp.c
Log:
log levelling.
Modified: gnucash/trunk/src/backend/file/sixtp.c
===================================================================
--- gnucash/trunk/src/backend/file/sixtp.c 2007-02-11 21:48:42 UTC (rev 15567)
+++ gnucash/trunk/src/backend/file/sixtp.c 2007-02-11 23:17:08 UTC (rev 15568)
@@ -34,7 +34,10 @@
#include "sixtp-parsers.h"
#include "sixtp-stack.h"
-static QofLogModule log_module = GNC_MOD_IO;
+#define LOG_MOD "gnc.backend.file.sixtp"
+static QofLogModule log_module = LOG_MOD;
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN LOG_MOD
/************************************************************************/
gboolean
@@ -160,7 +163,7 @@
if(!tochange)
{
- PWARN("Null tochange passed");
+ g_warning("Null tochange passed");
return NULL;
}
@@ -220,7 +223,7 @@
default:
va_end(ap);
- PERR("Bogus sixtp type %d", type);
+ g_critical("Bogus sixtp type %d", type);
if(cleanup)
{
sixtp_destroy(tochange);
@@ -254,20 +257,19 @@
gpointer lookup_key;
gpointer lookup_value;
- PINFO ("Killing sixtp child under key <%s>",
- key ? (char *) key : "(null)");
+ g_debug("Killing sixtp child under key <%s>", key ? (char *) key : "(null)");
g_free(key);
if(!corpses)
{
- PERR("no corpses in sixtp_destroy_child <%s>",
- key ? (char *) key : "(null)");
+ g_critical("no corpses in sixtp_destroy_child <%s>",
+ key ? (char *) key : "(null)");
return;
}
if(!child)
{
- PERR("no child in sixtp_destroy_child <%s>",
- key ? (char *) key : "");
+ g_critical("no child in sixtp_destroy_child <%s>",
+ key ? (char *) key : "");
return;
}
@@ -337,7 +339,7 @@
handler = va_arg(ap, sixtp*);
if(!handler)
{
- PWARN("Handler for tag %s is null",
+ g_warning("Handler for tag %s is null",
tag ? tag : "(null)");
if(cleanup)
@@ -400,8 +402,8 @@
(gpointer) &next_parser_tag, (gpointer) &next_parser);
if(!lookup_success)
{
- PERR("Tag <%s> not allowed in current context.",
- name ? (char *) name : "(null)");
+ g_critical("Tag <%s> not allowed in current context.",
+ name ? (char *) name : "(null)");
pdata->parsing_ok = FALSE;
next_parser = pdata->bad_xml_parser;
}
@@ -504,7 +506,7 @@
necessary? */
if(safe_strcmp(current_frame->tag, (gchar*) name) != 0)
{
- PWARN ("bad closing tag (start <%s>, end <%s>)", current_frame->tag, name);
+ g_warning("bad closing tag (start <%s>, end <%s>)", current_frame->tag, name);
pdata->parsing_ok = FALSE;
/* See if we're just off by one and try to recover */
@@ -512,7 +514,7 @@
pdata->stack = sixtp_pop_and_destroy_frame(pdata->stack);
current_frame = (sixtp_stack_frame *) pdata->stack->data;
parent_frame = (sixtp_stack_frame *) pdata->stack->next->data;
- PWARN ("found matching start <%s> tag up one level", name);
+ g_warning("found matching start <%s> tag up one level", name);
}
}
@@ -548,8 +550,7 @@
/* grab it before it goes away - we own the reference */
end_tag = current_frame->tag;
- PINFO("Finished with end of <%s>",
- end_tag ? end_tag : "(null)");
+ g_debug("Finished with end of <%s>", end_tag ? end_tag : "(null)");
/*sixtp_print_frame_stack(pdata->stack, stderr);*/
@@ -612,7 +613,7 @@
GSList *lp;
GSList **stack = &(sax_data->stack);
- PERR("parse failed at:");
+ g_critical("parse failed at:");
sixtp_print_frame_stack(sax_data->stack, stderr);
while(*stack)
@@ -689,7 +690,7 @@
if(!(ctxt = sixtp_context_new(sixtp, global_data, data_for_top_level)))
{
- PERR("sixtp_context_new returned null");
+ g_critical("sixtp_context_new returned null");
return FALSE;
}
@@ -761,12 +762,12 @@
xmlParserCtxtPtr xml_context;
if (!push_handler) {
- PERR("No push handler specified");
+ g_critical("No push handler specified");
return FALSE;
}
if (!(ctxt = sixtp_context_new(sixtp, global_data, data_for_top_level))) {
- PERR("sixtp_context_new returned null");
+ g_critical("sixtp_context_new returned null");
return FALSE;
}
More information about the gnucash-changes
mailing list