[tracker/on-extractor-error] libtracker-miner: Improve debugging messages on extractor error
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/on-extractor-error] libtracker-miner: Improve debugging messages on extractor error
- Date: Mon, 2 May 2011 13:41:13 +0000 (UTC)
commit 8614e4a5b9eda709c6ebdb12ef8171eb4eceb69a
Author: Philip Van Hoof <philip codeminded be>
Date: Mon May 2 15:40:45 2011 +0200
libtracker-miner: Improve debugging messages on extractor error
src/libtracker-miner/tracker-miner-fs.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index cbc89b6..13d9915 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1638,7 +1638,6 @@ item_add_or_update_cb (TrackerMinerFS *fs,
UpdateProcessingTaskContext *ctxt;
GFile *task_file;
gchar *uri;
- gboolean had_err = FALSE;
ctxt = tracker_processing_task_get_context (task);
task_file = tracker_processing_task_get_file (task);
@@ -1647,8 +1646,6 @@ item_add_or_update_cb (TrackerMinerFS *fs,
if (error) {
TrackerProcessingTask *first_item_task;
- had_err = TRUE;
-
first_item_task = tracker_processing_pool_get_last_wait (fs->private->processing_pool);
/* Perhaps this is too specific to TrackerMinerFiles, if the extractor
@@ -1682,8 +1679,10 @@ item_add_or_update_cb (TrackerMinerFS *fs,
attribute_update_only = GPOINTER_TO_INT (g_object_steal_qdata (G_OBJECT (task_file),
fs->private->quark_attribute_updated));
- g_debug ("Updating item%s '%s' with urn '%s'%s",
- had_err ? " (had extractor error)" : "",
+ g_debug ("Updating item%s%s%s '%s' with urn '%s'%s",
+ error != NULL ? " (which had extractor error '" : "",
+ error != NULL ? (error->message ? error->message : "No error given") : "",
+ error != NULL ? ")" : "",
uri,
ctxt->urn,
attribute_update_only ? " (attributes only)" : "");
@@ -1720,7 +1719,13 @@ item_add_or_update_cb (TrackerMinerFS *fs,
tracker_processing_task_set_sparql (task, ctxt->builder);
}
} else {
- g_debug ("Creating new item '%s'", uri);
+ if (error != NULL) {
+ g_debug ("Creating minimal info for new item '%s' which had error: '%s'",
+ uri,
+ error->message ? error->message : "No error given");
+ } else {
+ g_debug ("Creating new item '%s'", uri);
+ }
tracker_processing_task_set_sparql (task, ctxt->builder);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]