[tracker/tracker-extractor-log-module-used] tracker-extract: Provide clear logging about which extractor module is used
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-extractor-log-module-used] tracker-extract: Provide clear logging about which extractor module is used
- Date: Thu, 26 May 2011 08:54:50 +0000 (UTC)
commit 53d6fc5256e31b61173ed44845bbc1c47eba2248
Author: Martyn Russell <martyn lanedo com>
Date: Wed May 25 15:49:16 2011 +0100
tracker-extract: Provide clear logging about which extractor module is used
This is a bit of a regression, we used to say which extractor module was used
but we don't for some reason in master. This fixes that.
src/tracker-extract/tracker-extract.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index f4aa61e..5b050f0 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -227,6 +227,9 @@ get_file_metadata (TrackerExtract *extract,
#ifdef HAVE_LIBSTREAMANALYZER
gchar *content_type = NULL;
#endif
+ gint items;
+
+ g_debug ("Extracting...");
priv = TRACKER_EXTRACT_GET_PRIVATE (extract);
@@ -241,8 +244,7 @@ get_file_metadata (TrackerExtract *extract,
#ifdef HAVE_LIBSTREAMANALYZER
if (!priv->force_internal_extractors) {
- tracker_dbus_request_comment (request,
- " Extracting with libstreamanalyzer...");
+ g_debug (" Using libstreamanalyzer...");
tracker_topanalyzer_extract (uri, statements, &content_type);
@@ -256,8 +258,7 @@ get_file_metadata (TrackerExtract *extract,
return TRUE;
}
} else {
- tracker_dbus_request_comment (request,
- " Extracting with internal extractors ONLY...");
+ g_debug (" Using internal extractors ONLY...");
}
#endif /* HAVE_LIBSTREAMANALYZER */
@@ -327,7 +328,8 @@ get_file_metadata (TrackerExtract *extract,
if (module) {
StatisticsData *data;
- gint items;
+
+ g_debug (" Using %s...", g_module_name (module));
(func) (uri, mime_used, preupdate, statements, where);
@@ -349,16 +351,23 @@ get_file_metadata (TrackerExtract *extract,
*statements_out = statements;
*where_out = g_string_free (where, FALSE);
+ g_debug ("Done (%d items)", items);
+
return TRUE;
} else {
data->failed_count++;
}
} else {
+ g_debug (" No extractor was available for this mime type:'%s'",
+ mime_used);
+
priv->unhandled_count++;
}
}
- if (tracker_sparql_builder_get_length (statements) > 0) {
+ items = tracker_sparql_builder_get_length (statements);
+
+ if (items > 0) {
tracker_sparql_builder_insert_close (statements);
}
@@ -366,6 +375,8 @@ get_file_metadata (TrackerExtract *extract,
*statements_out = statements;
*where_out = g_string_free (where, FALSE);
+ g_debug ("No extractor or failed (%d items)", items);
+
return TRUE;
}
@@ -503,8 +514,6 @@ tracker_extract_get_metadata_by_cmdline (TrackerExtract *object,
g_return_if_fail (uri != NULL);
- g_message ("Extracting...");
-
if (get_file_metadata (object, uri, mime, &preupdate, &statements, &where)) {
const gchar *preupdate_str, *statements_str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]