tracker r1448 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/tracker-indexer/modules src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r1448 - in branches/indexer-split: . src/libtracker-common src/libtracker-db src/tracker-indexer/modules src/trackerd
- Date: Tue, 20 May 2008 08:15:31 +0000 (UTC)
Author: mr
Date: Tue May 20 08:15:30 2008
New Revision: 1448
URL: http://svn.gnome.org/viewvc/tracker?rev=1448&view=rev
Log:
* src/libtracker-common/Makefile.am:
* src/libtracker-common/tracker-file-utils.c:
* src/libtracker-common/tracker-language.c:
* src/libtracker-common/tracker-log.c:
* src/libtracker-common/tracker-log.h:
* src/libtracker-common/tracker-nfs-lock.c:
* src/libtracker-common/tracker-os-dependant-unix.c:
* src/libtracker-common/tracker-os-dependant-win.c:
* src/libtracker-common/tracker-type-utils.c:
* src/libtracker-db/Makefile.am:
* src/libtracker-db/tracker-db-file-info.c:
* src/libtracker-db/tracker-db-interface-sqlite.c:
* src/tracker-indexer/modules/files.c:
* src/trackerd/Makefile.am:
* src/trackerd/tracker-apps.c:
* src/trackerd/tracker-cache.c:
* src/trackerd/tracker-db-email.c:
* src/trackerd/tracker-db-sqlite.c:
* src/trackerd/tracker-db.c:
* src/trackerd/tracker-dbus-daemon.c:
* src/trackerd/tracker-dbus-keywords.c:
* src/trackerd/tracker-dbus-metadata.c:
* src/trackerd/tracker-dbus.c:
* src/trackerd/tracker-email-evolution.c:
* src/trackerd/tracker-email-kmail.c:
* src/trackerd/tracker-email-modest.c:
* src/trackerd/tracker-email-thunderbird.c:
* src/trackerd/tracker-email-utils.c:
* src/trackerd/tracker-fam.c:
* src/trackerd/tracker-hal.c:
* src/trackerd/tracker-index-stage.c:
* src/trackerd/tracker-indexer.c:
* src/trackerd/tracker-inotify.c:
* src/trackerd/tracker-ioprio.c:
* src/trackerd/tracker-main.c:
* src/trackerd/tracker-metadata.c:
* src/trackerd/tracker-process-files.c:
* src/trackerd/tracker-rdf-query.c:
* src/trackerd/tracker-service-manager.c:
* src/trackerd/tracker-utils.c:
* src/trackerd/tracker-xesam-query.c: Use the
g_{message|debug|warning|critical|error}() functions instead of
the tracker_log_() variants instead. Fixes bug #529373 (Carlos
Garnacho, Martyn Russell).
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-common/Makefile.am
branches/indexer-split/src/libtracker-common/tracker-file-utils.c
branches/indexer-split/src/libtracker-common/tracker-language.c
branches/indexer-split/src/libtracker-common/tracker-log.c
branches/indexer-split/src/libtracker-common/tracker-log.h
branches/indexer-split/src/libtracker-common/tracker-nfs-lock.c
branches/indexer-split/src/libtracker-common/tracker-os-dependant-unix.c
branches/indexer-split/src/libtracker-common/tracker-type-utils.c
branches/indexer-split/src/libtracker-db/Makefile.am
branches/indexer-split/src/libtracker-db/tracker-db-file-info.c
branches/indexer-split/src/tracker-indexer/modules/files.c
branches/indexer-split/src/trackerd/tracker-apps.c
branches/indexer-split/src/trackerd/tracker-cache.c
branches/indexer-split/src/trackerd/tracker-db-email.c
branches/indexer-split/src/trackerd/tracker-db-sqlite.c
branches/indexer-split/src/trackerd/tracker-db.c
branches/indexer-split/src/trackerd/tracker-dbus-daemon.c
branches/indexer-split/src/trackerd/tracker-dbus-keywords.c
branches/indexer-split/src/trackerd/tracker-dbus-metadata.c
branches/indexer-split/src/trackerd/tracker-dbus.c
branches/indexer-split/src/trackerd/tracker-email-evolution.c
branches/indexer-split/src/trackerd/tracker-email-modest.c
branches/indexer-split/src/trackerd/tracker-email-utils.c
branches/indexer-split/src/trackerd/tracker-hal.c
branches/indexer-split/src/trackerd/tracker-index-stage.c
branches/indexer-split/src/trackerd/tracker-indexer.c
branches/indexer-split/src/trackerd/tracker-inotify.c
branches/indexer-split/src/trackerd/tracker-ioprio.c
branches/indexer-split/src/trackerd/tracker-main.c
branches/indexer-split/src/trackerd/tracker-metadata.c
branches/indexer-split/src/trackerd/tracker-process-files.c
branches/indexer-split/src/trackerd/tracker-rdf-query.c
branches/indexer-split/src/trackerd/tracker-utils.c
branches/indexer-split/src/trackerd/tracker-xesam-query.c
Modified: branches/indexer-split/src/libtracker-common/Makefile.am
==============================================================================
--- branches/indexer-split/src/libtracker-common/Makefile.am (original)
+++ branches/indexer-split/src/libtracker-common/Makefile.am Tue May 20 08:15:30 2008
@@ -1,6 +1,7 @@
-INCLUDES = \
- $(GLIB2_CFLAGS) \
- -DSHAREDIR=\""$(datadir)"\" \
+INCLUDES = \
+ $(GLIB2_CFLAGS) \
+ -DSHAREDIR=\""$(datadir)"\" \
+ -DG_LOG_DOMAIN=\"Tracker\" \
-I$(top_srcdir)/src
noinst_LTLIBRARIES = libtracker-common.la
Modified: branches/indexer-split/src/libtracker-common/tracker-file-utils.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-file-utils.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-file-utils.c Tue May 20 08:15:30 2008
@@ -199,8 +199,8 @@
str = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
if (!str) {
- tracker_error ("URI:'%s' could not be converted to locale format",
- uri);
+ g_warning ("URI:'%s' could not be converted to locale format",
+ uri);
return FALSE;
}
@@ -227,8 +227,8 @@
str = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
if (!str) {
- tracker_error ("URI:'%s' could not be converted to locale format",
- str);
+ g_warning ("URI:'%s' could not be converted to locale format",
+ str);
return FALSE;
}
@@ -245,11 +245,13 @@
struct stat finfo;
gboolean is_indexable;
+ g_return_val_if_fail (uri != NULL, FALSE);
+
str = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
if (!str) {
- tracker_error ("URI:'%s' could not be converted to locale format",
- str);
+ g_warning ("URI:'%s' could not be converted to locale format",
+ str);
return FALSE;
}
@@ -260,9 +262,9 @@
is_indexable &= !S_ISDIR (finfo.st_mode);
is_indexable &= S_ISREG (finfo.st_mode);
- tracker_debug ("URI:'%s' %s indexable",
- uri,
- is_indexable ? "is" : "is not");
+ g_debug ("URI:'%s' %s indexable",
+ uri,
+ is_indexable ? "is" : "is not");
return is_indexable;
}
@@ -281,8 +283,8 @@
return 0;
}
} else {
- tracker_error ("URI:'%s' could not be converted to locale format",
- uri);
+ g_warning ("URI:'%s' could not be converted to locale format",
+ uri);
return 0;
}
@@ -300,16 +302,16 @@
gchar *mime_type;
if (!tracker_file_is_valid (uri)) {
- tracker_log ("URI:'%s' is no longer valid",
- uri);
+ g_message ("URI:'%s' is no longer valid",
+ uri);
return g_strdup ("unknown");
}
str = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
if (!str) {
- tracker_error ("URI:'%s' could not be converted to locale format",
- uri);
+ g_warning ("URI:'%s' could not be converted to locale format",
+ uri);
return g_strdup ("unknown");
}
Modified: branches/indexer-split/src/libtracker-common/tracker-language.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-language.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-language.c Tue May 20 08:15:30 2008
@@ -261,7 +261,7 @@
mapped_file = g_mapped_file_new (filename, FALSE, &error);
if (error) {
- tracker_log ("Tracker couldn't read stopword file:'%s', %s",
+ g_message ("Tracker couldn't read stopword file:'%s', %s",
filename, error->message);
g_clear_error (&error);
return;
@@ -295,7 +295,7 @@
priv = GET_PRIV (language);
/* Set up stopwords list */
- tracker_log ("Setting up stopword list for language code:'%s'", language_code);
+ g_message ("Setting up stopword list for language code:'%s'", language_code);
stopword_filename = language_get_stopword_filename (language_code);
language_add_stopwords (language, stopword_filename);
@@ -307,7 +307,7 @@
g_free (stopword_filename);
}
- tracker_log ("Setting up stemmer for language code:'%s'", language_code);
+ g_message ("Setting up stemmer for language code:'%s'", language_code);
stem_language = language_get_name_for_code (language_code);
@@ -319,8 +319,8 @@
priv->stemmer = sb_stemmer_new (stem_language, NULL);
if (!priv->stemmer) {
- tracker_log ("No stemmer could be found for language:'%s'",
- stem_language);
+ g_message ("No stemmer could be found for language:'%s'",
+ stem_language);
}
g_mutex_unlock (priv->stemmer_mutex);
Modified: branches/indexer-split/src/libtracker-common/tracker-log.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-log.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-log.c Tue May 20 08:15:30 2008
@@ -29,25 +29,21 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <glib/gstdio.h>
-#ifdef OS_WIN32
-#include <conio.h>
-#include "mingw-compat.h"
-#else
-#include <sys/resource.h>
-#endif
+#include <glib/gstdio.h>
#include "tracker-log.h"
typedef struct {
GMutex *mutex;
+ gchar *domain;
gchar *filename;
gint verbosity;
gboolean abort_on_error;
} TrackerLog;
static TrackerLog *log = NULL;
+static guint log_handler_id;
static inline void
log_output (const char *message)
@@ -64,8 +60,6 @@
g_return_if_fail (log != NULL);
g_return_if_fail (message != NULL && message[0] != '\0');
- g_print ("%s\n", message);
-
/* Ensure file logging is thread safe */
g_mutex_lock (log->mutex);
@@ -103,26 +97,45 @@
g_mutex_unlock (log->mutex);
}
+static void
+tracker_log_handler (const gchar *domain,
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
+{
+ if (((log_level & G_LOG_LEVEL_DEBUG) && log->verbosity < 3) ||
+ ((log_level & G_LOG_LEVEL_INFO) && log->verbosity < 2) ||
+ ((log_level & G_LOG_LEVEL_MESSAGE) && log->verbosity < 1)) {
+ return;
+ }
+
+ log_output (message);
+
+ /* now show the message through stdout/stderr as usual */
+ g_log_default_handler (domain, log_level, message, user_data);
+}
+
void
-tracker_log_init (const gchar *filename,
- gint verbosity,
- gboolean abort_on_error)
+tracker_log_init (const gchar *domain,
+ const gchar *filename,
+ gint verbosity)
{
+ g_return_if_fail (domain != NULL);
g_return_if_fail (filename != NULL);
-
+
if (log != NULL) {
- tracker_error ("Logger already initialized (%s)", log->filename);
+ g_warning ("Logger already initialized (%s)", log->filename);
return;
}
log = g_new0 (TrackerLog, 1);
-
- log->verbosity = verbosity;
-
+ log->domain = g_strdup (domain);
log->filename = g_strdup (filename);
-
log->mutex = g_mutex_new ();
- log->abort_on_error = abort_on_error;
+ log->verbosity = verbosity;
+
+ log_handler_id = g_log_set_handler (NULL, G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL,
+ tracker_log_handler, log);
}
void
@@ -130,91 +143,14 @@
{
g_return_if_fail (log != NULL);
+ g_log_remove_handler (NULL, log_handler_id);
+ log_handler_id = 0;
+
g_mutex_free (log->mutex);
+ g_free (log->domain);
g_free (log->filename);
-
g_free (log);
/* Reset the log pointer so we can re-initialise if we want */
log = NULL;
}
-
-void
-tracker_log (const char *message, ...)
-{
- va_list args;
- gchar *str;
-
- g_return_if_fail (log != NULL);
-
- if (log->verbosity < 1) {
- return;
- }
-
- va_start (args, message);
- str = g_strdup_vprintf (message, args);
- va_end (args);
-
- log_output (str);
- g_free (str);
-}
-
-void
-tracker_info (const char *message, ...)
-{
- va_list args;
- gchar *str;
-
- g_return_if_fail (log != NULL);
-
- if (log->verbosity < 2) {
- return;
- }
-
- va_start (args, message);
- str = g_strdup_vprintf (message, args);
- va_end (args);
-
- log_output (str);
- g_free (str);
-}
-
-void
-tracker_debug (const char *message, ...)
-{
- va_list args;
- gchar *str;
-
- g_return_if_fail (log != NULL);
-
- if (log->verbosity < 3) {
- return;
- }
-
- va_start (args, message);
- str = g_strdup_vprintf (message, args);
- va_end (args);
-
- log_output (str);
- g_free (str);
-}
-
-void
-tracker_error (const char *message, ...)
-{
- va_list args;
- gchar *str;
-
- g_return_if_fail (log != NULL);
-
- va_start (args, message);
- str = g_strdup_vprintf (message, args);
- va_end (args);
-
- log_output (str);
- g_free (str);
-
- if (log->abort_on_error) {
- g_assert (FALSE);
- }
-}
Modified: branches/indexer-split/src/libtracker-common/tracker-log.h
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-log.h (original)
+++ branches/indexer-split/src/libtracker-common/tracker-log.h Tue May 20 08:15:30 2008
@@ -26,18 +26,10 @@
G_BEGIN_DECLS
-void tracker_log_init (const char *filename,
- gint verbosity,
- gboolean abort_on_error);
+void tracker_log_init (const gchar *domain,
+ const char *filename,
+ gint verbosity);
void tracker_log_term (void);
-void tracker_log (const char *message,
- ...);
-void tracker_info (const char *message,
- ...);
-void tracker_debug (const char *message,
- ...);
-void tracker_error (const char *message,
- ...);
G_END_DECLS
Modified: branches/indexer-split/src/libtracker-common/tracker-nfs-lock.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-nfs-lock.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-nfs-lock.c Tue May 20 08:15:30 2008
@@ -79,7 +79,7 @@
}
if (!is_initialized()) {
- tracker_error ("Could not initialise NFS lock");
+ g_critical ("Could not initialise NFS lock");
return FALSE;
}
@@ -119,7 +119,7 @@
}
error:
- tracker_error ("Could not get NFS lock state");
+ g_critical ("Could not get NFS lock state");
g_free (tmp_file);
return FALSE;
@@ -134,8 +134,8 @@
return;
}
- if (!is_initialized()) {
- tracker_error ("Could not initialise NFS lock");
+ if (!is_initialized ()) {
+ g_critical ("Could not initialise NFS lock");
return;
}
@@ -164,8 +164,8 @@
tmp_filepath = g_build_filename (root_dir, g_get_host_name (), NULL);
}
- tracker_log ("NFS lock initialised %s",
- use_nfs_safe_locking ? "" : "(safe locking not in use)");
+ g_message ("NFS lock initialised %s",
+ use_nfs_safe_locking ? "" : "(safe locking not in use)");
}
void
@@ -183,5 +183,5 @@
g_free (tmp_filepath);
}
- tracker_log ("NFS lock finalised");
+ g_message ("NFS lock finalised");
}
Modified: branches/indexer-split/src/libtracker-common/tracker-os-dependant-unix.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-os-dependant-unix.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-os-dependant-unix.c Tue May 20 08:15:30 2008
@@ -135,7 +135,7 @@
#endif
if (fail) {
- tracker_error ("Error trying to set memory limit");
+ g_critical ("Error trying to set memory limit");
}
return !fail;
@@ -153,7 +153,7 @@
cpu_limit.rlim_max = timeout + 1;
if (setrlimit (RLIMIT_CPU, &cpu_limit) != 0) {
- tracker_error ("Failed to set resource limit for CPU");
+ g_critical ("Failed to set resource limit for CPU");
}
set_memory_rlimits ();
@@ -167,7 +167,7 @@
* so we have to check value of errno too. Stupid...
*/
if (nice (19) == -1 && errno) {
- tracker_error ("Failed to set nice value");
+ g_warning ("Failed to set nice value");
}
/* Have this as a precaution in cases where cpu limit has not
Modified: branches/indexer-split/src/libtracker-common/tracker-type-utils.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-type-utils.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-type-utils.c Tue May 20 08:15:30 2008
@@ -423,9 +423,9 @@
}
if (*timestamp++ != 'T') {
- tracker_error ("ERROR: date validation failed for %s st %c",
- timestamp,
- *timestamp);
+ g_critical ("Date validation failed for '%s' st '%c'",
+ timestamp,
+ *timestamp);
return -1;
}
Modified: branches/indexer-split/src/libtracker-db/Makefile.am
==============================================================================
--- branches/indexer-split/src/libtracker-db/Makefile.am (original)
+++ branches/indexer-split/src/libtracker-db/Makefile.am Tue May 20 08:15:30 2008
@@ -4,6 +4,7 @@
$(GMIME_CFLAGS) \
$(SQLITE3_CFLAGS) \
$(QDBM_CFLAGS) \
+ -DG_LOG_DOMAIN=\"Ttracker\" \
-I$(top_srcdir)/src
noinst_LTLIBRARIES = libtracker-db.la
Modified: branches/indexer-split/src/libtracker-db/tracker-db-file-info.c
==============================================================================
--- branches/indexer-split/src/libtracker-db/tracker-db-file-info.c (original)
+++ branches/indexer-split/src/libtracker-db/tracker-db-file-info.c Tue May 20 08:15:30 2008
@@ -285,7 +285,8 @@
}
} else {
- tracker_error ("ERROR: info->uri could not be converted to locale format");
+ g_warning ("URI:'%s' could not be converted to locale format",
+ info->uri);
return NULL;
}
Modified: branches/indexer-split/src/tracker-indexer/modules/files.c
==============================================================================
--- branches/indexer-split/src/tracker-indexer/modules/files.c (original)
+++ branches/indexer-split/src/tracker-indexer/modules/files.c Tue May 20 08:15:30 2008
@@ -17,13 +17,16 @@
* Boston, MA 02110-1301, USA.
*/
-#include <glib.h>
-#include <glib/gstdio.h>
-#include <libtracker-common/tracker-config.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+
+#include <libtracker-common/tracker-config.h>
+#include <libtracker-common/tracker-file-utils.h>
+
#define METADATA_FILE_NAME_DELIMITED "File:NameDelimited"
#define METADATA_FILE_EXT "File:Ext"
#define METADATA_FILE_PATH "File:Path"
Modified: branches/indexer-split/src/trackerd/tracker-apps.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-apps.c (original)
+++ branches/indexer-split/src/trackerd/tracker-apps.c Tue May 20 08:15:30 2008
@@ -44,7 +44,6 @@
/* Add user defined applications path to service directory list */
if (dir) {
- tracker_log ("Registering path %s as belonging to service Applications", dir);
tracker_ontology_add_dir_to_service_type ("Applications", dir);
g_free (dir);
}
@@ -58,15 +57,12 @@
gint i;
for (i = 0; dir_array[i] != NULL; ++i) {
dir = g_strdup_printf ("%s/applications", dir_array[i]);
- tracker_info ("Registering path %s as belonging to service Applications", dir);
tracker_ontology_add_dir_to_service_type ("Applications", dir);
g_free (dir);
}
g_strfreev (dir_array);
} else {
- tracker_log ("Registering path %s as belonging to service Applications", "/usr/local/share/applications");
- tracker_log ("Registering path %s as belonging to service Applications", "/usr/share/applications");
tracker_ontology_add_dir_to_service_type ("Applications", "/usr/local/share/applications");
tracker_ontology_add_dir_to_service_type ("Applications", "/usr/share/applications");
}
Modified: branches/indexer-split/src/trackerd/tracker-cache.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-cache.c (original)
+++ branches/indexer-split/src/trackerd/tracker-cache.c Tue May 20 08:15:30 2008
@@ -258,9 +258,9 @@
return;
}
- tracker_log ("Flushing all words - total hits in cache is %d, total words %d",
- tracker->word_detail_count,
- tracker->word_count);
+ g_message ("Flushing all words - total hits in cache is %d, total words %d",
+ tracker->word_detail_count,
+ tracker->word_count);
/* If word count is small then flush to main index rather than
* a new temp index.
@@ -274,7 +274,7 @@
*/
if (tracker_indexer_size (tracker->file_index) > 4000000) {
index_con.file_index = create_merge_index ("file-index.tmp.");
- tracker_log ("flushing to %s", tracker_indexer_get_name (index_con.file_index));
+ g_message ("flushing to %s", tracker_indexer_get_name (index_con.file_index));
using_file_tmp = TRUE;
} else {
index_con.file_index = tracker->file_index;
@@ -282,7 +282,7 @@
if (tracker_indexer_size (tracker->email_index) > 4000000) {
index_con.email_index = create_merge_index ("email-index.tmp.");
- tracker_log ("flushing to %s", tracker_indexer_get_name (index_con.email_index));
+ g_message ("flushing to %s", tracker_indexer_get_name (index_con.email_index));
using_email_tmp = TRUE;
} else {
index_con.email_index = tracker->email_index;
@@ -448,7 +448,7 @@
}
if (tracker->grace_period > 1) {
- tracker_log ("Pausing indexer while client requests/disk I/O take place");
+ g_message ("Pausing indexer while client requests/disk I/O take place");
tracker->request_waiting = FALSE;
Modified: branches/indexer-split/src/trackerd/tracker-db-email.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-email.c (original)
+++ branches/indexer-split/src/trackerd/tracker-db-email.c Tue May 20 08:15:30 2008
@@ -66,7 +66,7 @@
tracker_exec_proc (db_con, "InsertMboxDetails", str_mail_app, str_mail_type, filename, path, uri_prefix, NULL);
- tracker_log ("Registered email store %s of type %s", filename, types[mail_type]);
+ g_message ("Registered email store %s of type %s", filename, types[mail_type]);
g_free (str_mail_app);
g_free (str_mail_type);
@@ -267,7 +267,7 @@
g_free (str_delete_count);
} else {
- tracker_error ("ERROR: invalid dir_path \"%s\"", dir_path);
+ g_critical ("invalid dir_path \"%s\"", dir_path);
}
}
@@ -284,7 +284,7 @@
if (offset == -1) {
/* we need to add this mbox */
- tracker_error ("ERROR: mbox/dir for emails for %s is not registered", mbox_file_path);
+ g_critical ("mbox/dir for emails for %s is not registered", mbox_file_path);
}
return offset;
@@ -298,7 +298,7 @@
g_return_if_fail (mf);
if (!mf->path) {
- tracker_error ("ERROR: invalid mbox (empty path!)");
+ g_critical ("invalid mbox (empty path!)");
return;
}
@@ -312,7 +312,7 @@
g_free (str_offset);
} else {
- tracker_error ("ERROR: invalid mbox \"%s\"", mf->path);
+ g_critical ("invalid mbox \"%s\"", mf->path);
}
}
@@ -428,24 +428,24 @@
g_return_val_if_fail (mm, FALSE);
if (!mm->uri) {
- tracker_error ("ERROR: email has no uri");
+ g_critical ("email has no uri");
return FALSE;
}
if (!mm->subject) {
- tracker_log ("WARNING: email with uri: %s has no subject",mm->uri);
+ g_message ("WARNING: email with uri: %s has no subject",mm->uri);
mm->subject = g_strdup("");
}
if (mm->parent_mail_file && !mm->parent_mail_file->path) {
- tracker_error ("ERROR: badly formatted email - abandoning index");
+ g_critical ("badly formatted email - abandoning index");
return FALSE;
}
if (mm->store) {
mm->store->mail_count++;
} else {
- tracker_error ("WARNING: no mail store found for email");
+ g_critical ("no mail store found for email");
}
if (mm->deleted || mm->junk) {
@@ -460,7 +460,7 @@
mm->store->junk_count++;
}
} else {
- tracker_error ("WARNING: no mail store found for email");
+ g_critical ("no mail store found for email");
}
return TRUE;
@@ -472,7 +472,7 @@
if (mm->is_mbox) {
mbox_id = tracker_db_email_get_mbox_id (db_con, mm->parent_mail_file->path);
if (mbox_id == -1) {
- tracker_error ("ERROR: no mbox is registered for email %s", mm->uri);
+ g_critical ("no mbox is registered for email %s", mm->uri);
return TRUE;
}
}
@@ -490,7 +490,7 @@
type_id = tracker_ontology_get_id_for_service_type (service);
if (type_id == -1) {
- tracker_error ("ERROR: service %s not found", service);
+ g_critical ("service %s not found", service);
g_free (attachment_service);
g_free (service);
g_free (mime);
@@ -513,8 +513,8 @@
gchar *str_id, *str_date;
GSList *tmp;
-
- tracker_info ("saving email service %d with uri \"%s\" and subject \"%s\" from \"%s\"", type_id, mm->uri, mm->subject, mm->from);
+ g_message ("Saving email service:%d with uri:'%s' and subject:'%s' from:'%s'",
+ type_id, mm->uri, mm->subject, mm->from);
index_table = g_hash_table_new (g_str_hash, g_str_equal);
str_id = tracker_int_to_string (id);
@@ -691,7 +691,8 @@
attachment_info->mime = g_strdup (ma->mime);
uri = g_strconcat (mm->uri, "/", ma->attachment_name, NULL);
- tracker_info ("indexing attachment with uri %s and mime %s", uri, attachment_info->mime);
+ g_message ("Indexing attachment with uri:'%s' and mime:'%s'",
+ uri, attachment_info->mime);
tracker_db_index_file (db_con, attachment_info, uri, attachment_service);
g_free (uri);
@@ -709,7 +710,7 @@
}
} else {
- tracker_error ("ERROR: failed to save email %s", mm->uri);
+ g_critical ("failed to save email %s", mm->uri);
}
g_free (attachment_service);
@@ -735,7 +736,7 @@
g_return_if_fail (db_con);
g_return_if_fail (mm);
- tracker_log ("update email with uri \"%s\" and subject \"%s\" from \"%s\"", mm->uri, mm->subject, mm->from);
+ g_message ("update email with uri \"%s\" and subject \"%s\" from \"%s\"", mm->uri, mm->subject, mm->from);
/* FIXME: add code... */
}
@@ -764,7 +765,7 @@
return FALSE;
}
- tracker_info ("deleting email %s", uri);
+ g_message ("Deleting email:'%s'", uri);
tracker_db_delete_directory (db_con, atoi (id), uri);
Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.c (original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.c Tue May 20 08:15:30 2008
@@ -399,7 +399,7 @@
filename = tracker_db_manager_get_sql_file (sql_file);
if (!g_file_get_contents (filename, &query, NULL, NULL)) {
- tracker_error ("ERROR: Tracker cannot read required file %s - Please reinstall tracker or check read permissions on the file if it exists", sql_file);
+ g_critical ("Can not read SQL file:'%s', please reinstall tracker or check read permissions on the file if it exists", sql_file);
g_assert (FALSE);
} else {
char **queries, **queries_p ;
@@ -411,7 +411,7 @@
}
g_strfreev (queries);
g_free (query);
- tracker_log ("loaded sql file %s", sql_file);
+ g_message ("Loaded SQL file:'%s'", sql_file);
}
g_free (filename);
@@ -455,9 +455,7 @@
groups = g_key_file_get_groups (key_file, NULL);
for (group = groups; *group; group++) {
-
-
- tracker_log ("Trying to obtain service %s in cache", *group);
+ g_message ("Trying to obtain service:'%s' in cache", *group);
service = tracker_ontology_get_service_type_by_name (*group);
if (!service) {
@@ -734,7 +732,7 @@
gchar *sql_filename;
gdouble secs;
- tracker_log ("Loading prepared queries...");
+ g_message ("Loading prepared queries...");
prepared_queries = g_hash_table_new_full (g_str_hash,
g_str_equal,
@@ -748,9 +746,9 @@
mapped_file = g_mapped_file_new (sql_filename, FALSE, &error);
if (error || !mapped_file) {
- tracker_debug ("Could not get contents of SQL file:'%s', %s",
- sql_filename,
- error ? error->message : "no error given");
+ g_warning ("Could not get contents of SQL file:'%s', %s",
+ sql_filename,
+ error ? error->message : "no error given");
if (mapped_file) {
g_mapped_file_free (mapped_file);
@@ -762,9 +760,9 @@
return FALSE;
}
- tracker_debug ("Opened prepared queries file:'%s' size:%" G_GSIZE_FORMAT " bytes",
- sql_filename,
- g_mapped_file_get_length (mapped_file));
+ g_message ("Loaded prepared queries file:'%s' size:%" G_GSIZE_FORMAT " bytes",
+ sql_filename,
+ g_mapped_file_get_length (mapped_file));
queries = g_strsplit (g_mapped_file_get_contents (mapped_file), "\n", -1);
g_free (sql_filename);
@@ -785,7 +783,7 @@
continue;
}
- tracker_debug (" Adding query:'%s'", details[0]);
+ g_message (" Adding query:'%s'", details[0]);
g_hash_table_insert (prepared_queries,
g_strdup (details[0]),
@@ -800,9 +798,9 @@
g_timer_destroy (t);
g_mapped_file_free (mapped_file);
- tracker_log ("Found %d prepared queries in %4.4f seconds",
- g_hash_table_size (prepared_queries),
- secs);
+ g_message ("Found %d prepared queries in %4.4f seconds",
+ g_hash_table_size (prepared_queries),
+ secs);
return TRUE;
}
@@ -813,7 +811,8 @@
if (iface) {
g_object_unref (iface);
}
- tracker_debug ("Database closed");
+
+ g_message ("Closed database");
}
@@ -841,7 +840,7 @@
if (!tracker_db_interface_sqlite_set_collation_function (TRACKER_DB_INTERFACE_SQLITE (iface),
"UTF8", utf8_collation_func)) {
- tracker_error ("ERROR: collation sequence failed");
+ g_critical ("Collation sequence failed");
}
/* create user defined functions that can be used in sql */
@@ -903,7 +902,7 @@
tracker_db_attach_db (DBConnection *db_con, TrackerDatabase database)
{
if (database != TRACKER_DB_COMMON && database != TRACKER_DB_CACHE) {
- tracker_error ("Attaching invalid db");
+ g_critical ("Attaching invalid database, expected common or cache database");
return;
}
@@ -1122,7 +1121,7 @@
db_con->data = db_con;
if (create_table) {
- tracker_log ("Creating file database... %s",
+ g_message ("Creating database for file metadata:'%s'",
tracker_db_manager_get_file (TRACKER_DB_FILE_META));
load_sql_file (db_con->db, "sqlite-service.sql");
load_sql_trigger (db_con->db, "sqlite-service-triggers.sql");
@@ -1221,8 +1220,8 @@
if (create) {
load_sql_file (db_con->db, "sqlite-contents.sql");
- tracker_log ("Creating db: %s",
- tracker_db_manager_get_file (TRACKER_DB_FILE_CONTENTS));
+ g_message ("Creating database for file content:'%s'",
+ tracker_db_manager_get_file (TRACKER_DB_FILE_CONTENTS));
}
tracker_db_interface_sqlite_create_function (db_con->db, "uncompress", function_uncompress, 1);
@@ -1254,8 +1253,8 @@
if (create_table) {
load_sql_file (db_con->db, "sqlite-contents.sql");
- tracker_log ("Creating db: %s",
- tracker_db_manager_get_file (TRACKER_DB_EMAIL_CONTENTS));
+ g_message ("Creating database for email content:'%s'",
+ tracker_db_manager_get_file (TRACKER_DB_EMAIL_CONTENTS));
}
tracker_db_interface_sqlite_create_function (db_con->db, "uncompress", function_uncompress, 1);
@@ -1361,8 +1360,8 @@
if (create_table) {
load_sql_file (db_con->db, "sqlite-cache.sql");
tracker_db_exec_no_reply (db_con->db, "ANALYZE");
- tracker_log ("Creating db: %s",
- tracker_db_manager_get_file (TRACKER_DB_CACHE));
+ g_message ("Creating database for cache:'%s'",
+ tracker_db_manager_get_file (TRACKER_DB_CACHE));
}
return db_con;
@@ -1387,9 +1386,11 @@
db_con->emails = db_con;
if (create_table) {
- tracker_log ("Creating email database...");
+ g_message ("Creating database for services:'sqlite-service.sql'");
load_sql_file (db_con->db, "sqlite-service.sql");
load_sql_trigger (db_con->db, "sqlite-service-triggers.sql");
+
+ g_message ("Creating database for email:'sqlite-email.sql'");
load_sql_file (db_con->db, "sqlite-email.sql");
tracker_db_exec_no_reply (db_con->db, "ANALYZE");
@@ -1487,8 +1488,7 @@
{
DBConnection *db_con;
- tracker_log ("Creating tracker database...");
-
+ g_message ("Creating all databases...");
/* create common db first */
@@ -1714,7 +1714,7 @@
id = tracker_ontology_get_field_id ("File:Contents");
if (!id) {
- tracker_error ("WARNING: metadata not found for type %s", "File:Contents");
+ g_warning ("Metadata not found for type:'File:Contents'");
return;
}
@@ -1738,10 +1738,10 @@
compressed = function_compress_string (text, length, &bytes_compressed);
if (compressed) {
- tracker_debug ("compressed full text size of %d to %d", length, bytes_compressed);
+ g_debug ("Compressed full text size of %d to %d", length, bytes_compressed);
value = compressed;
} else {
- tracker_error ("WARNING: compression has failed");
+ g_warning ("Could not compress text'%*s...', length:%d", 16, text, length);
value = g_strdup (text);
bytes_compressed = length;
}
@@ -1750,7 +1750,7 @@
field_id = tracker_ontology_get_field_id ("File:Contents");
if (!field_id) {
- tracker_error ("WARNING: metadata not found for type %s", "File:Contents");
+ g_warning ("Metadata not found for type:'File:Contents'");
g_free (value);
return;
}
@@ -1783,7 +1783,7 @@
fd = tracker_file_open (file_name, TRUE);
if (fd ==-1) {
- tracker_error ("ERROR: could not open file %s", file_name);
+ g_critical ("Could not open file:'%s'", file_name);
return;
}
@@ -1792,7 +1792,7 @@
strm.opaque = Z_NULL;
if (deflateInit (&strm, Z_DEFAULT_COMPRESSION) != Z_OK) {
- tracker_error ("ERROR: could not initialise zlib");
+ g_critical ("Could not initialise zlib");
close (fd);
return;
}
@@ -1831,7 +1831,7 @@
char *end = strrchr (buffer, '\n');
if (!end) {
- tracker_log ("Could not find line break in text chunk..exiting");
+ g_warning ("Could not find line break in text chunk");
break;
}
@@ -1842,7 +1842,7 @@
buffer[buffer_length] = '\0';
if (lseek (fd, bytes_backtracked, SEEK_CUR) == -1) {
- tracker_error ("Could not seek to line break in text chunk");
+ g_warning ("Could not seek to line break in text chunk");
break;
}
@@ -1858,7 +1858,7 @@
if (!value) {
finished = FALSE;
- tracker_info ("could not convert text to valid utf8");
+ g_warning ("Could not convert text to valid UTF-8");
break;
}
@@ -1908,7 +1908,7 @@
if (ret == Z_STREAM_ERROR) {
finished = FALSE;
- tracker_error ("compression failed");
+ g_critical ("Could not compress text");
if (!use_buffer) g_free (value);
break;
}
@@ -1945,7 +1945,7 @@
save_full_text_bytes (blob_db_con, str_file_id, byte_array);
}
} else {
- tracker_info ("An error prevented full text extraction");
+ g_warning ("An error prevented full text extraction");
}
g_byte_array_free (byte_array, TRUE);
@@ -2088,7 +2088,7 @@
g_free (path);
g_object_unref (result_set);
} else {
- tracker_log ("dud hit for search detected");
+ g_warning ("Dud hit for search detected");
/* add to dud list */
duds = g_slist_prepend (duds, &hit);
}
@@ -2149,7 +2149,7 @@
def = tracker_ontology_get_field_def (field);
if (!def) {
- tracker_error ("ERROR: metadata not found for type %s", field);
+ g_warning ("Metadata not found for type:'%s'", field);
return NULL;
}
@@ -2170,8 +2170,9 @@
result_set = tracker_exec_proc (db_con, "SearchMetadataKeywords", tracker_field_get_id (def), text, NULL);
break;
- default:
- tracker_error ("ERROR: metadata could not be retrieved as type %d is not supported", tracker_field_get_data_type (def));
+ default:
+ g_warning ("Metadata could not be retrieved as type:%d is not supported",
+ tracker_field_get_data_type (def));
result_set = NULL;
}
@@ -2198,7 +2199,7 @@
def = tracker_ontology_get_field_def (key);
if (!def) {
- tracker_error ("ERROR: metadata not found for id %s and type %s", id, key);
+ g_warning ("Metadata not found for id:'%s' and type:'%s'", id, key);
return NULL;
}
@@ -2220,7 +2221,8 @@
break;
default:
- tracker_error ("ERROR: metadata could not be retrieved as type %d is not supported", tracker_field_get_data_type (def));
+ g_warning ("Metadata could not be retrieved as type:%d is not supported",
+ tracker_field_get_data_type (def));
result_set = NULL;
}
@@ -2272,7 +2274,7 @@
gint sid;
if (!def) {
- tracker_error ("ERROR: cannot find details for metadata type");
+ g_warning ("Can not find details for metadata type");
return;
}
@@ -2447,7 +2449,7 @@
def = tracker_ontology_get_field_def (key);
if (!def) {
- tracker_error ("ERROR: metadata %s not found", key);
+ g_warning ("Metadata with key:'%s' not found", key);
return;
}
@@ -2600,7 +2602,7 @@
gchar *mvalue = format_date (values[i]);
if (!mvalue) {
- tracker_debug ("Could not format date %s", values[i]);
+ g_warning ("Could not format date:'%s'", values[i]);
continue;
}
@@ -2612,7 +2614,8 @@
break;
}
default: {
- tracker_error ("ERROR: metadata could not be set as type %d for metadata %s is not supported",
+ g_warning ("Metadata could not be set as type:%d for "
+ "metadata:'%s' is not supported",
tracker_field_get_data_type (def), key);
break;
}
@@ -2748,7 +2751,7 @@
def = tracker_ontology_get_field_def (key);
if (!def) {
- tracker_error ("metadata type %s not found", key);
+ g_warning ("Metadata type:'%s' not found", key);
return NULL;
}
@@ -2756,7 +2759,7 @@
res_service = tracker_db_get_service_for_entity (db_con, id);
if (!res_service) {
- tracker_error ("ERROR: service not found for id %s", id);
+ g_warning ("Service not found for id:'%s'", id);
return NULL;
}
@@ -2805,7 +2808,7 @@
new_value = values[i];
}
- tracker_log ("saving keyword %s", values[i]);
+ g_message ("Saving keyword:'%s'", values[i]);
}
break;
@@ -2937,7 +2940,7 @@
char *mvalue = format_date (values[i]);
if (!mvalue) {
- tracker_debug ("Could not format date %s", values[i]);
+ g_warning ("Could not format date:'%s'", values[i]);
continue;
}
@@ -2958,8 +2961,10 @@
break;
default :
-
- tracker_error ("ERROR: metadata could not be set as type %d for metadata %s is not supported", tracker_field_get_data_type (def), key);
+ g_warning ("Metadata could not be set as type:%d for "
+ "metadata:'%s' is not supported",
+ tracker_field_get_data_type (def),
+ key);
break;
@@ -3078,7 +3083,7 @@
char *res_service = tracker_db_get_service_for_entity (db_con, id);
if (!res_service) {
- tracker_error ("ERROR: entity not found");
+ g_warning ("Entity not found");
return;
}
@@ -3138,7 +3143,10 @@
break;
default:
- tracker_error ("ERROR: metadata could not be deleted as type %d for metadata %s is not supported", tracker_field_get_data_type (def), key);
+ g_warning ("Metadata could not be deleted as type:%d for "
+ "metadata:'%s' is not supported",
+ tracker_field_get_data_type (def),
+ key);
break;
@@ -3216,7 +3224,7 @@
char *res_service = tracker_db_get_service_for_entity (db_con, id);
if (!res_service) {
- tracker_error ("ERROR: entity not found");
+ g_warning ("Entity not found");
return;
}
@@ -3229,8 +3237,6 @@
if (update_index) {
/* get current value */
old_value = tracker_db_get_metadata_delimited (db_con, service, id, key);
- tracker_debug ("old value is %s", old_value);
-
}
@@ -3267,7 +3273,11 @@
break;
default:
- tracker_error ("ERROR: metadata could not be deleted as this operation is not supported by type %d for metadata %s", tracker_field_get_data_type (def), key);
+ g_warning ("Metadata could not be deleted as this "
+ "operation is not supported by type:%d "
+ "for metadata:'%s'",
+ tracker_field_get_data_type (def),
+ key);
break;
}
@@ -3288,8 +3298,6 @@
TrackerDBResultSet*
tracker_db_get_live_search_hit_count (DBConnection *db_con, const gchar *search_id)
{
- tracker_debug ("GetLiveSearchHitCount");
-
/* SELECT count(*)
* FROM LiveSearches
* WHERE SearchID = ? */
@@ -3301,8 +3309,6 @@
TrackerDBResultSet*
tracker_db_get_live_search_deleted_ids (DBConnection *db_con, const gchar *search_id)
{
- tracker_debug ("GetLiveSearchDeletedIDs");
-
/* SELECT E.ServiceID
* FROM Events as E, LiveSearches as X
* WHERE E.ServiceID = X.ServiceID
@@ -3315,8 +3321,6 @@
void
tracker_db_stop_live_search (DBConnection *db_con, const gchar *search_id)
{
- tracker_debug ("LiveSearchStopSearch");
-
/* DELETE
* FROM LiveSearches as X
* WHERE E.SearchID = ? */
@@ -3356,8 +3360,6 @@
* OR X.EventType IS 'Update')
**/
- tracker_debug ("LiveSearchUpdateQuery");
-
return tracker_db_exec (db_con->db,
/* COLUMNS */ "SELECT E.ServiceID, E.EventType%s%s "
/* FROM_QUERY */ "%s%s LiveSearches as X, Events as E "
@@ -3379,8 +3381,6 @@
TrackerDBResultSet *
tracker_db_get_live_search_get_hit_data (DBConnection *db_con, const gchar *search_id)
{
- tracker_debug ("tracker_db_get_live_search_get_hit_data");
-
return tracker_db_exec (db_con->db,
"SELECT * FROM LiveSearches as X "
"WHERE X.SearchID = '%s'",
@@ -3390,9 +3390,7 @@
TrackerDBResultSet*
tracker_db_get_events (DBConnection *db_con)
{
- tracker_debug ("SetEventsBeingHandled");
tracker_exec_proc_no_reply (db_con->cache->db, "SetEventsBeingHandled", NULL);
- tracker_debug ("GetEvents");
return tracker_exec_proc (db_con->cache, "GetEvents", NULL);
}
@@ -3400,7 +3398,6 @@
void
tracker_db_delete_handled_events (DBConnection *db_con, TrackerDBResultSet *events)
{
- tracker_debug ("DeleteHandledEvents");
tracker_exec_proc_no_reply (db_con->cache->db, "DeleteHandledEvents", NULL);
}
@@ -3415,7 +3412,7 @@
result_set = tracker_exec_proc (db_con->common, "GetNewEventID", NULL);
if (!result_set) {
- tracker_error ("ERROR: could not create event - GetNewEventID failed");
+ g_critical ("Could not create event, GetNewEventID failed");
return 0;
}
@@ -3430,8 +3427,6 @@
g_object_unref (result_set);
/* Uses the Events table */
- tracker_debug ("CreateEvent %s", eid);
-
result_set = tracker_exec_proc (db_con->cache, "CreateEvent", eid, service_id_str, type, NULL);
id = tracker_db_interface_sqlite_get_last_insert_id (TRACKER_DB_INTERFACE_SQLITE (db_con->db));
if (result_set)
@@ -3457,11 +3452,11 @@
int service_type_id;
char *str_service_type_id, *path, *name;
- if (!info || !info->uri || !info->uri[0] || !service || !db_con) {
- tracker_error ("ERROR: cannot create service");
- return 0;
-
- }
+ g_return_val_if_fail (info, 0);
+ g_return_val_if_fail (info->uri, 0);
+ g_return_val_if_fail (info->uri[0], 0);
+ g_return_val_if_fail (service, 0);
+ g_return_val_if_fail (db_con, 0);
if (info->uri[0] == G_DIR_SEPARATOR) {
name = g_path_get_basename (info->uri);
@@ -3477,7 +3472,7 @@
result_set = tracker_exec_proc (db_con->common, "GetNewID", NULL);
if (!result_set) {
- tracker_error ("ERROR: could not create service - GetNewID failed");
+ g_critical ("Could not create service, GetNewID failed");
return 0;
}
@@ -3514,9 +3509,9 @@
service_type_id = tracker_ontology_get_id_for_service_type (service);
if (info->mime) {
- tracker_debug ("service id for %s is %d and sid is %s with mime %s", service, service_type_id, sid, info->mime);
+ g_debug ("service id for %s is %d and sid is %s with mime %s", service, service_type_id, sid, info->mime);
} else {
- tracker_debug ("service id for %s is %d and sid is %s", service, service_type_id, sid);
+ g_debug ("service id for %s is %d and sid is %s", service, service_type_id, sid);
}
str_service_type_id = tracker_int_to_string (service_type_id);
@@ -3703,7 +3698,7 @@
} else {
- tracker_debug ("could not dec stat for service ID %d", id);
+ g_debug ("could not dec stat for service ID %d", id);
}
}
@@ -4029,7 +4024,7 @@
query = g_string_free (str, FALSE);
- tracker_debug ("getting files with mimes using sql %s", query);
+ g_debug ("getting files with mimes using sql %s", query);
result_set = tracker_db_interface_execute_query (db_con->db, NULL, query);
@@ -4396,12 +4391,12 @@
tracker_db_move_file (DBConnection *db_con, const char *moved_from_uri, const char *moved_to_uri)
{
- tracker_log ("Moving file %s to %s", moved_from_uri, moved_to_uri);
+ g_message ("Moving file:'%s' to:'%s'", moved_from_uri, moved_to_uri);
/* if orig file not in DB, treat it as a create action */
guint32 id = tracker_db_get_file_id (db_con, moved_from_uri);
if (id == 0) {
- tracker_debug ("WARNING: original file %s not found in DB", moved_from_uri);
+ g_warning ("Original file:'%s' not found in database", moved_from_uri);
tracker_db_insert_pending_file (db_con, id, moved_to_uri, NULL, "unknown", 0, TRACKER_DB_ACTION_WRITABLE_FILE_CLOSED, FALSE, TRUE, -1);
tracker_db_interface_end_transaction (db_con->db);
return;
@@ -4559,7 +4554,7 @@
new_path = g_build_filename (moved_to_uri, sep, NULL);
g_free (sep);
- tracker_info ("moving subfolder %s to %s", dir_name, new_path);
+ g_message ("Moving subfolder:'%s' to:'%s'", dir_name, new_path);
move_directory (db_con, dir_name, new_path);
@@ -4634,7 +4629,7 @@
if (score == 0) return;
- tracker_debug ("updating index for word %s with score %d", word, score);
+ g_debug ("Updating index for word %s with score %d", word, score);
tracker_cache_add (word, info->service_id, info->service_type_id, score, FALSE);
@@ -4716,7 +4711,6 @@
tracker_db_get_keyword_list (DBConnection *db_con, const char *service)
{
- tracker_debug (service);
return tracker_exec_proc (db_con, "GetKeywordList", service, service, NULL);
}
@@ -4929,9 +4923,11 @@
g_object_unref (result_set2);
}
+ g_message ("Loading metadata def:'%s' with weight:%d",
+ tracker_field_get_name (def),
+ tracker_field_get_weight (def));
+
tracker_ontology_add_field (def);
- tracker_debug ("loading metadata def %s with weight %d",
- tracker_field_get_name (def), tracker_field_get_weight (def));
g_free (name);
@@ -4968,7 +4964,10 @@
mimes = tracker_db_get_mimes_for_service_id (db_con, id);
mime_prefixes = tracker_db_get_mime_prefixes_for_service_id (db_con, id);
- tracker_debug ("Adding service definition for %s with id %d", name, id);
+ g_message ("Adding service:'%s' with id:%d and mimes:%d",
+ name,
+ id,
+ g_slist_length (mimes));
tracker_ontology_add_service_type (service,
mimes,
mime_prefixes);
@@ -4984,7 +4983,7 @@
/* check for web history */
if (!tracker_ontology_get_service_type_by_name ("Webhistory")) {
- tracker_log ("Adding missing Webhistory service");
+ g_message ("Adding missing Webhistory service");
tracker_exec_proc (db_con, "InsertServiceType", "Webhistory", NULL);
}
}
@@ -5539,10 +5538,10 @@
if (tracker->index_count > 1) {
tracker_db_end_index_transaction (db_con);
tracker_db_start_index_transaction (db_con);
- tracker_log ("Current memory usage is %d, word count %d and hits %d",
- get_memory_usage (),
- tracker->word_count,
- tracker->word_detail_count);
+ g_message ("Current memory usage is %d, word count %d and hits %d",
+ get_memory_usage (),
+ tracker->word_count,
+ tracker->word_detail_count);
}
return TRUE;
Modified: branches/indexer-split/src/trackerd/tracker-db.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.c (original)
+++ branches/indexer-split/src/trackerd/tracker-db.c Tue May 20 08:15:30 2008
@@ -365,7 +365,7 @@
def = tracker_ontology_get_field_def (meta);
if (!def) {
- tracker_error ("ERROR: failed to get info for metadata type %s", meta);
+ g_critical ("failed to get info for metadata type %s", meta);
return FALSE;
}
@@ -464,7 +464,7 @@
g_thread_yield ();
g_usleep (10);
- tracker_debug ("In check phase");
+ g_debug ("In check phase");
}
}
@@ -485,7 +485,7 @@
if (!move_file && ((counter > 0) || (g_async_queue_length (tracker->file_process_queue) > tracker->max_process_queue_size))) {
- /* tracker_log ("************ counter for pending file %s is %d ***********", uri, counter); */
+ /* g_message ("************ counter for pending file %s is %d ***********", uri, counter); */
if (!mime) {
tracker_db_insert_pending (db_con, str_file_id, str_action, str_counter, uri, "unknown", is_directory, is_new, service_type_id);
} else {
@@ -525,7 +525,7 @@
return;
}
- /* tracker_log ("inserting pending file for %s with action %s", uri, tracker_actions[action]); */
+ /* g_message ("inserting pending file for %s with action %s", uri, tracker_actions[action]); */
/* signal respective thread that data is available and awake it if its asleep */
if (action == TRACKER_DB_ACTION_EXTRACT_METADATA) {
@@ -628,14 +628,15 @@
head = g_queue_peek_head_link (tracker->file_change_queue);
- tracker_log ("File Change queue is:");
+ g_message ("File Change queue is:");
count = 1;
for (l = g_list_first (head); l != NULL; l = g_list_next (l)) {
change = (TrackerDBFileChange*) l->data;
- tracker_info ("%d\t%s\t%d\t%d",
- count++, change->uri,
- change->first_change_time,
- change->num_of_change);
+ g_message ("%d\t%s\t%d\t%d",
+ count++,
+ change->uri,
+ (gint) change->first_change_time,
+ change->num_of_change);
}
}
@@ -728,7 +729,7 @@
/* add uri to blacklist */
- tracker_log ("blacklisting %s", change->uri);
+ g_message ("blacklisting %s", change->uri);
tracker_process_files_append_temp_black_list (change->uri);
@@ -839,7 +840,7 @@
db_action = user_data;
string_list = tracker_gslist_to_string_list (value);
- tracker_log ("restoring keyword list with %d items", g_slist_length (value));
+ g_message ("restoring keyword list with %d items", g_slist_length (value));
tracker_db_set_metadata (db_action->db_con, db_action->service, db_action->file_id, mtype, string_list, g_slist_length (value), FALSE);
@@ -858,9 +859,9 @@
if (!service) {
/* its an external service - TODO get external service name */
if (service) {
- tracker_log ("External service %s not supported yet", service);
+ g_message ("External service %s not supported yet", service);
} else {
- tracker_log ("External service not supported yet");
+ g_message ("External service not supported yet");
}
return;
}
@@ -874,7 +875,7 @@
info->service_type_id = tracker_ontology_get_id_for_service_type (service);
if (info->service_type_id == -1) {
- tracker_log ("Service %s not supported yet", service);
+ g_message ("Service %s not supported yet", service);
return;
}
@@ -884,14 +885,18 @@
if (info->is_new) {
if (info->mime)
- tracker_info ("Indexing %s with service %s and mime %s (new)", uri, service, info->mime);
+ g_message ("Indexing:'%s' with service:'%s' and mime:'%s' (new)",
+ uri, service, info->mime);
else
- tracker_info ("Indexing %s with service %s (new)", uri, service);
+ g_message ("Indexing:'%s' with service:'%s' (new)",
+ uri, service);
} else {
if (info->mime)
- tracker_info ("Indexing %s with service %s and mime %s (existing)", uri, service, info->mime);
+ g_message ("Indexing:'%s' with service:'%s' and mime:'%s' (existing)",
+ uri, service, info->mime);
else
- tracker_info ("Indexing %s with service %s (existing)", uri, service);
+ g_message ("Indexing:'%s' with service:'%s' (existing)",
+ uri, service);
}
@@ -923,12 +928,12 @@
info->uri = old_uri;
if (info->file_id == 0) {
- tracker_error ("ERROR: could not get file id for %s - unable to continue indexing this file", uri);
+ g_critical ("Could not get file id for:'%s', unable to continue indexing this file", uri);
return;
}
if (info->service_type_id == -1) {
- tracker_error ("ERROR: unknown service type for %s with service %s and mime %s", uri, service, info->mime);
+ g_critical ("Unknown service type for:'%s' with service:'%s' and mime %s", uri, service, info->mime);
}
}
@@ -1037,7 +1042,7 @@
1, &value,
-1);
- tracker_log ("found backup metadata for %s\%s with key %s and value %s", path, name, key, value);
+ g_message ("found backup metadata for %s\%s with key %s and value %s", path, name, key, value);
tracker_add_metadata_to_table (meta_table, key, value);
valid = tracker_db_result_set_iter_next (result_set);
@@ -1093,7 +1098,7 @@
strcmp (curr_ext+1, "xmp") != 0 &&
!g_str_has_suffix (curr_ext+1, "~")) {
- tracker_debug ("master file, %s, about to be updated", curr_filename);
+ g_debug ("master file, %s, about to be updated", curr_filename);
master_uri = g_build_filename (dirname, curr_filename, NULL);
master_info = tracker_db_file_info_new (master_uri, TRACKER_DB_ACTION_FILE_CHANGED, 0, 0);
@@ -1142,7 +1147,8 @@
info->mime = g_strdup ("unknown");
}
- tracker_info ("mime is %s for %s", info->mime, info->uri);
+ g_message ("Mime is:'%s' for:'%s'",
+ info->mime, info->uri);
service_name = tracker_ontology_get_service_type_for_mime (info->mime);
@@ -1165,7 +1171,7 @@
ext = strrchr (filename, '.');
if (ext) {
ext++;
- tracker_debug ("file extension is %s", ext);
+ g_debug ("file extension is %s", ext);
tracker_add_metadata_to_table (meta_table, g_strdup ("File:Ext"), g_strdup (ext));
is_sidecar = strcmp("xmp",ext) == 0;
} else {
@@ -1195,7 +1201,7 @@
char buf[512];
fgets(buf,512,fp); //get the first line, it is URL for this web history object
- tracker_debug("URL for this WebHistory is %s\n",buf);
+ g_debug("URL for this WebHistory is %s\n",buf);
tracker_add_metadata_to_table (meta_table, g_strdup ("Doc:URL"), g_strdup(buf));
fgets(buf,512,fp);
@@ -1212,7 +1218,7 @@
char *doc_keyword = g_strdup (keys[1]);
- tracker_debug("found keywords : %s\n",doc_keyword);
+ g_debug("found keywords : %s\n",doc_keyword);
tracker_add_metadata_to_table (meta_table, g_strdup ("Doc:Keywords"), doc_keyword);
}
@@ -1268,7 +1274,7 @@
gchar *sidecar_uri = g_build_filename (dirname, sidecar_filename, NULL);
if (g_file_test (sidecar_uri, G_FILE_TEST_EXISTS)) {
- tracker_debug ("xmp sidecar found for %s", uri);
+ g_debug ("xmp sidecar found for %s", uri);
tracker_metadata_get_embedded (sidecar_uri, XMP_MIME_TYPE, meta_table);
}
@@ -1279,7 +1285,7 @@
}
#endif
- tracker_debug ("file %s has fulltext %d with service %s", info->uri, service_has_fulltext, service_name);
+ g_debug ("file %s has fulltext %d with service %s", info->uri, service_has_fulltext, service_name);
tracker_db_index_service (db_con, info, service_name, meta_table, uri, attachment_service, service_has_metadata, service_has_fulltext, service_has_thumbs);
g_hash_table_destroy (meta_table);
Modified: branches/indexer-split/src/trackerd/tracker-dbus-daemon.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-daemon.c (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-daemon.c Tue May 20 08:15:30 2008
@@ -431,41 +431,41 @@
priv->tracker->pause_manual = value;
if (value) {
- tracker_log ("Tracker daemon has been paused by user");
+ g_message ("Tracker daemon has been paused by user");
} else {
- tracker_log ("Tracker daemon has been resumed by user");
+ g_message ("Tracker daemon has been resumed by user");
}
} else if (strcasecmp (option, "FastMerges") == 0) {
tracker_config_set_fast_merges (priv->config, value);
- tracker_log ("Fast merges set to %d", value);
+ g_message ("Fast merges set to %d", value);
} else if (strcasecmp (option, "EnableIndexing") == 0) {
signal_state_change = TRUE;
tracker_config_set_enable_indexing (priv->config, value);
- tracker_log ("Enable indexing set to %d", value);
+ g_message ("Enable indexing set to %d", value);
} else if (strcasecmp (option, "EnableWatching") == 0) {
tracker_config_set_enable_watches (priv->config, value);
- tracker_log ("Enable Watching set to %d", value);
+ g_message ("Enable Watching set to %d", value);
} else if (strcasecmp (option, "LowMemoryMode") == 0) {
tracker_config_set_low_memory_mode (priv->config, value);
- tracker_log ("Extra memory usage set to %d", !value);
+ g_message ("Extra memory usage set to %d", !value);
} else if (strcasecmp (option, "IndexFileContents") == 0) {
tracker_config_set_enable_content_indexing (priv->config, value);
- tracker_log ("Index file contents set to %d", value);
+ g_message ("Index file contents set to %d", value);
} else if (strcasecmp (option, "GenerateThumbs") == 0) {
tracker_config_set_enable_thumbnails (priv->config, value);
- tracker_log ("Generate thumbnails set to %d", value);
+ g_message ("Generate thumbnails set to %d", value);
} else if (strcasecmp (option, "IndexMountedDirectories") == 0) {
tracker_config_set_index_mounted_directories (priv->config, value);
- tracker_log ("Indexing mounted directories set to %d", value);
+ g_message ("Indexing mounted directories set to %d", value);
} else if (strcasecmp (option, "IndexRemovableDevices") == 0) {
tracker_config_set_index_removable_devices (priv->config, value);
- tracker_log ("Indexing removable devices set to %d", value);
+ g_message ("Indexing removable devices set to %d", value);
} else if (strcasecmp (option, "BatteryIndex") == 0) {
tracker_config_set_disable_indexing_on_battery (priv->config, !value);
- tracker_log ("Disable index on battery set to %d", !value);
+ g_message ("Disable index on battery set to %d", !value);
} else if (strcasecmp (option, "BatteryIndexInitial") == 0) {
tracker_config_set_disable_indexing_on_battery_init (priv->config, !value);
- tracker_log ("Disable initial index sweep on battery set to %d", !value);
+ g_message ("Disable initial index sweep on battery set to %d", !value);
}
if (signal_state_change) {
@@ -516,13 +516,13 @@
if (strcasecmp (option, "Throttle") == 0) {
tracker_config_set_throttle (priv->config, value);
- tracker_log ("throttle set to %d", value);
+ g_message ("throttle set to %d", value);
} else if (strcasecmp (option, "MaxText") == 0) {
tracker_config_set_max_text_to_index (priv->config, value);
- tracker_log ("Maxinum amount of text set to %d", value);
+ g_message ("Maxinum amount of text set to %d", value);
} else if (strcasecmp (option, "MaxWords") == 0) {
tracker_config_set_max_words_to_index (priv->config, value);
- tracker_log ("Maxinum number of unique words set to %d", value);
+ g_message ("Maxinum number of unique words set to %d", value);
}
tracker_notify_file_data_available ();
@@ -549,7 +549,7 @@
priv = GET_PRIV (object);
- tracker_log ("Tracker daemon attempting to restart");
+ g_message ("Tracker daemon attempting to restart");
priv->tracker->reindex = reindex;
Modified: branches/indexer-split/src/trackerd/tracker-dbus-keywords.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-keywords.c (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-keywords.c Tue May 20 08:15:30 2008
@@ -353,7 +353,7 @@
tracker_notify_file_data_available ();
for (p = values; *p; p++) {
- tracker_log ("Added keyword %s to %s with ID %s", *p, uri, id);
+ g_message ("Added keyword %s to %s with ID %s", *p, uri, id);
g_signal_emit (object, signals[KEYWORD_ADDED], 0, service, uri, *p);
}
@@ -421,7 +421,7 @@
tracker_notify_file_data_available ();
for (p = values; *p; p++) {
- tracker_log ("Removed keyword %s from %s with ID %s", *p, uri, id);
+ g_message ("Removed keyword %s from %s with ID %s", *p, uri, id);
tracker_db_delete_metadata_value (db_con, service, id, "User:Keywords", *p);
/* FIXME: Should we be doing this for EACH keyword? */
@@ -601,7 +601,7 @@
g_string_free (select, TRUE);
g_string_free (where, TRUE);
- tracker_debug (query);
+ g_debug (query);
result_set = tracker_db_interface_execute_query (db_con->db, NULL, query);
*values = tracker_dbus_query_result_to_strv (result_set, NULL);
Modified: branches/indexer-split/src/trackerd/tracker-dbus-metadata.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus-metadata.c (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus-metadata.c Tue May 20 08:15:30 2008
@@ -268,7 +268,7 @@
query = g_string_free (sql, FALSE);
- tracker_debug (query);
+ g_debug (query);
result_set = tracker_db_interface_execute_query (db_con->db, NULL, query);
*values = tracker_dbus_query_result_to_strv (result_set, NULL);
Modified: branches/indexer-split/src/trackerd/tracker-dbus.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-dbus.c (original)
+++ branches/indexer-split/src/trackerd/tracker-dbus.c Tue May 20 08:15:30 2008
@@ -53,26 +53,26 @@
GError *error = NULL;
guint result;
- tracker_log ("Registering DBus service...\n"
- " Name '%s'",
- name);
+ g_message ("Registering DBus service...\n"
+ " Name '%s'",
+ name);
if (!org_freedesktop_DBus_request_name (proxy,
name,
DBUS_NAME_FLAG_DO_NOT_QUEUE,
&result, &error)) {
- tracker_error ("Could not aquire name: %s, %s",
- name,
- error ? error->message : "no error given");
-
+ g_critical ("Could not aquire name: %s, %s",
+ name,
+ error ? error->message : "no error given");
g_error_free (error);
+
return FALSE;
}
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
- tracker_error ("DBus service name %s is already taken, "
- "perhaps the daemon is already running?",
- name);
+ g_critical ("DBus service name '%s' is already taken, "
+ "perhaps the daemon is already running?",
+ name);
return FALSE;
}
@@ -88,9 +88,9 @@
{
GObject *object;
- tracker_log ("Registering DBus object...");
- tracker_log (" Path '%s'", path);
- tracker_log (" Type '%s'", g_type_name (object_type));
+ g_message ("Registering DBus object...");
+ g_message (" Path '%s'", path);
+ g_message (" Type '%s'", g_type_name (object_type));
object = g_object_new (object_type, NULL);
@@ -125,7 +125,9 @@
}
gboolean
-tracker_dbus_preinit (Tracker *tracker, DBusGConnection **connection_out, DBusGProxy **proxy_out)
+tracker_dbus_preinit (Tracker *tracker,
+ DBusGConnection **connection_out,
+ DBusGProxy **proxy_out)
{
DBusGConnection *connection;
DBusGProxy *proxy;
@@ -133,14 +135,13 @@
g_return_val_if_fail (tracker != NULL, FALSE);
-
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (!connection) {
- tracker_error ("Could not connect to the DBus session bus, %s",
- error ? error->message : "no error given.");
- if (error)
- g_error_free (error);
+ g_critical ("Could not connect to the DBus session bus, %s",
+ error ? error->message : "no error given.");
+ g_clear_error (&error);
+
return FALSE;
}
@@ -164,18 +165,21 @@
}
gboolean
-tracker_dbus_init (Tracker *tracker, DBusGConnection *connection, DBusGProxy *proxy)
+tracker_dbus_init (Tracker *tracker,
+ DBusGConnection *connection,
+ DBusGProxy *proxy)
{
- GObject *object;
+ GObject *object;
g_return_val_if_fail (tracker != NULL, FALSE);
+ g_return_val_if_fail (connection != NULL, FALSE);
+ g_return_val_if_fail (proxy != NULL, FALSE);
/* Don't reinitialize */
if (objects) {
return TRUE;
}
-
/* Add org.freedesktop.Tracker */
if (!(object = dbus_register_object (connection,
proxy,
@@ -500,9 +504,9 @@
str = g_strdup_vprintf (format, args);
va_end (args);
- tracker_log ("<--- [%d] %s",
- request_id,
- str);
+ g_message ("<--- [%d] %s",
+ request_id,
+ str);
g_free (str);
}
@@ -510,8 +514,8 @@
void
tracker_dbus_request_success (gint request_id)
{
- tracker_log ("---> [%d] Success, no error given",
- request_id);
+ g_message ("---> [%d] Success, no error given",
+ request_id);
}
void
@@ -529,9 +533,9 @@
g_set_error (error, TRACKER_DBUS_ERROR, 0, str);
- tracker_log ("---> [%d] Failed, %s",
- request_id,
- str);
+ g_message ("---> [%d] Failed, %s",
+ request_id,
+ str);
g_free (str);
}
@@ -547,8 +551,8 @@
str = g_strdup_vprintf (format, args);
va_end (args);
- tracker_log ("---- [%d] %s",
- request_id,
- str);
+ g_message ("---- [%d] %s",
+ request_id,
+ str);
g_free (str);
}
Modified: branches/indexer-split/src/trackerd/tracker-email-evolution.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-evolution.c (original)
+++ branches/indexer-split/src/trackerd/tracker-email-evolution.c Tue May 20 08:15:30 2008
@@ -393,7 +393,7 @@
if (g_str_has_prefix (file_name, "outbox")) goto end_index;
if (g_str_has_prefix (file_name, "drafts")) goto end_index;
- tracker_debug ("indexing email summary %s", info->uri);
+ g_debug ("indexing email summary %s", info->uri);
if (is_in_dir_local (info->uri) && g_str_has_suffix (file_name, ".ev-summary")) {
/* a MBox file changed */
@@ -402,7 +402,7 @@
mbox_file = tracker_get_radix_by_suffix (info->uri, ".ev-summary");
- tracker_debug ("summary %s is an mbox", info->uri);
+ g_debug ("summary %s is an mbox", info->uri);
/* check mbox is registered */
if (tracker_db_email_get_mbox_id (db_con, mbox_file) == -1) {
@@ -433,16 +433,16 @@
if (store && open_summary_file (info->uri, &summary)) {
SummaryFileHeader *header = NULL;
- tracker_info ("investigating summary file %s", mbox_file);
+ g_message ("Investigating summary file:'%s'", mbox_file);
if (!load_summary_file_header (summary, &header)) {
- tracker_error ("ERROR: failed to load summary file %s", info->uri);
+ g_critical ("failed to load summary file %s", info->uri);
free_summary_file (summary);
goto end_index;
}
if (!load_summary_file_meta_header_for_local (summary, header)) {
- tracker_error ("ERROR: failed to load summary header file %s", info->uri);
+ g_critical ("failed to load summary header file %s", info->uri);
free_summary_file_header (header);
free_summary_file (summary);
goto end_index;
@@ -453,18 +453,19 @@
load_uri_and_status_of_mbox_mail_message, NULL,
NULL, NULL,
store)) {
- tracker_info ("setting junk status on email file %s", mbox_file);
+ g_message ("Setting junk status on email file:'%s'",
+ mbox_file);
tracker_db_email_flag_mbox_junk (db_con, mbox_file);
} else {
tracker_db_email_set_message_counts (db_con, mbox_file, store->mail_count, store->junk_count, store->delete_count);
- tracker_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", mbox_file,
+ g_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", mbox_file,
store->mail_count, store->junk_count, store->delete_count, header->saved_count, header->junk_count, header->deleted_count);
}
free_summary_file_header (header);
free_summary_file (summary);
} else {
- tracker_error ("ERROR: failed to open summary file %s", info->uri);
+ g_critical ("failed to open summary file %s", info->uri);
}
g_free (mbox_file);
@@ -642,11 +643,11 @@
header = NULL;
- tracker_log ("Scanning summary file %s for junk", filename);
+ g_message ("Scanning summary file %s for junk", filename);
if (!load_summary_file_header (summary, &header)) {
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary file %s", filename);
+ g_critical ("failed to open summary file %s", filename);
return;
}
@@ -655,7 +656,7 @@
if (!load_summary_file_meta_header_for_local (summary, header)) {
free_summary_file_header (header);
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary header file %s", filename);
+ g_critical ("failed to open summary header file %s", filename);
return;
}
} else if (store->type == MAIL_TYPE_IMAP || store->type == MAIL_TYPE_IMAP4) {
@@ -663,11 +664,11 @@
if (!load_summary_file_meta_header_for_imap (summary, header)) {
free_summary_file_header (header);
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary header file %s", filename);
+ g_critical ("failed to open summary header file %s", filename);
return;
}
} else {
- tracker_error ("ERROR: summary file not supported");
+ g_critical ("summary file not supported");
free_summary_file_header (header);
free_summary_file (summary);
return;
@@ -701,7 +702,7 @@
}
} else {
- tracker_error ("ERROR: whilst scanning summary file");
+ g_critical ("whilst scanning summary file");
return;
break;
}
@@ -788,7 +789,7 @@
accounts = find_accounts_by_gconf (NULL);
- tracker_log ("Checking for Evolution email accounts...");
+ g_message ("Checking for Evolution email accounts...");
for (account = accounts; account; account = account->next) {
EvolutionAccount *evo_acc = account->data;
@@ -810,7 +811,7 @@
if (account_name) {
- tracker_log ("Found imap account %s", account_name);
+ g_message ("Found imap account %s", account_name);
m_conf->imap_dirs = g_slist_prepend (m_conf->imap_dirs, g_build_filename (dir_imap, account_name, NULL));
@@ -1115,7 +1116,7 @@
source_url = g_strndup (text, text_len);
- tracker_log ("Found email account uri %s", source_url);
+ g_message ("Found email account uri %s", source_url);
if (strncmp (source_url, "mbox:", 5) == 0 || strncmp (source_url, "pop", 3) == 0) {
state->account->protocol = EVOLUTION_MAIL_PROTOCOL_MBOX;
@@ -1356,7 +1357,7 @@
MailStore *store = tracker_db_email_get_mbox_details (db_con, dir);
if (!store) {
- tracker_error ("ERROR: could not retrieve store for file %s", dir);
+ g_critical ("could not retrieve store for file %s", dir);
free_summary_file (summary);
free_summary_file_header (header);
@@ -1364,7 +1365,7 @@
return;
}
- tracker_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", dir,
+ g_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", dir,
store->mail_count, store->junk_count, store->delete_count, header->saved_count, header->junk_count, header->deleted_count);
tracker->mbox_count++;
@@ -1386,7 +1387,7 @@
/* skip already indexed emails */
for (i = 0; i < store->mail_count; i++) {
if (!(*skip_mail) (summary)) {
- tracker_error ("ERROR: skipping email no. %d in summary file", i+1);
+ g_critical ("skipping email no. %d in summary file", i+1);
tracker_db_email_free_mail_store (store);
free_summary_file (summary);
free_summary_file_header (header);
@@ -1405,10 +1406,10 @@
MailMessage *mail_msg = NULL;
mail_count++;
- tracker_debug ("processing email no. %d / %" G_GINT32_FORMAT, store->mail_count + 1, header->saved_count);
+ g_debug ("processing email no. %d / %" G_GINT32_FORMAT, store->mail_count + 1, header->saved_count);
if (!(*load_mail) (summary, &mail_msg)) {
- tracker_error ("ERROR: loading email no. %d in summary file", mail_count);
+ g_critical ("loading email no. %d in summary file", mail_count);
tracker_db_email_free_mail_store (store);
free_summary_file (summary);
free_summary_file_header (header);
@@ -1428,10 +1429,10 @@
mail_msg->store = store;
if (!(*save_ondisk_mail) (db_con, mail_msg)) {
- tracker_log ("WARNING: Message, or message parts, could not be found locally - if you are using IMAP make sure you have selected the \"copy folder content locally for offline operation\" option in Evolution");
+ g_message ("WARNING: Message, or message parts, could not be found locally - if you are using IMAP make sure you have selected the \"copy folder content locally for offline operation\" option in Evolution");
/* we do not have all infos but we still save them */
if (!tracker_db_email_save_email (db_con, mail_msg, MAIL_APP_EVOLUTION)) {
- tracker_log ("Failed to save email");
+ g_message ("Failed to save email");
}
}
@@ -1460,7 +1461,7 @@
if (tracker_db_regulate_transactions (db_con->data, 500)) {
if (tracker_config_get_verbosity (tracker->config) == 1) {
- tracker_log ("indexing #%d - Emails in %s", tracker->index_count, dir);
+ g_message ("indexing #%d - Emails in %s", tracker->index_count, dir);
}
if (tracker->index_count % 1000 == 0) {
@@ -1482,7 +1483,7 @@
}
- tracker_log ("No. of new emails indexed in summary file %s is %d, %d junk, %d deleted", dir, mail_count, junk_count, delete_count);
+ g_message ("No. of new emails indexed in summary file %s is %d, %d junk, %d deleted", dir, mail_count, junk_count, delete_count);
tracker_db_email_set_message_counts (db_con, dir, store->mail_count, store->junk_count, store->delete_count);
@@ -1615,7 +1616,7 @@
continue;
}
- tracker_debug ("Account name for summary file is %s and path is %s", account_name, (*summary)->path);
+ g_debug ("Account name for summary file is %s and path is %s", account_name, (*summary)->path);
gchar *source_account_name = get_account_name_from_imap_uri (evo_acc->source_url);
@@ -1645,7 +1646,7 @@
}
default:
- tracker_error ("ERROR: no matching account found for email");
+ g_critical ("no matching account found for email");
continue;
break;
}
@@ -1704,17 +1705,17 @@
goto error;
}
- tracker_debug ("summary.version = %d", h->version);
+ g_debug ("summary.version = %d", h->version);
if (h->version > 0xff && (h->version & 0xff) < 12) {
- tracker_error ("ERROR: summary file header version too low");
+ g_critical ("summary file header version too low");
goto error;
}
h->legacy = !(h->version < 0x100 && h->version >= 13);
if (h->legacy) {
- tracker_debug ("WARNING: summary file is a legacy version");
+ g_debug ("WARNING: summary file is a legacy version");
}
@@ -1725,10 +1726,10 @@
goto error;
}
- tracker_debug ("summary.flags = %d", h->flags);
- tracker_debug ("summary.nextuid = %d", h->nextuid);
- tracker_debug ("summary.time = %d", h->time);
- tracker_debug ("summary.count = %" G_GINT32_FORMAT, h->saved_count);
+ g_debug ("summary.flags = %d", h->flags);
+ g_debug ("summary.nextuid = %d", h->nextuid);
+ g_debug ("summary.time = %d", (gint) h->time);
+ g_debug ("summary.count = %" G_GINT32_FORMAT, h->saved_count);
if (!h->legacy) {
if (!decode_gint32 (f, &h->unread_count) ||
@@ -1738,9 +1739,9 @@
}
}
- tracker_debug ("summary.Unread = %d", h->unread_count);
- tracker_debug ("summary.deleted = %d", h->deleted_count);
- tracker_debug ("summary.junk = %d", h->junk_count);
+ g_debug ("summary.Unread = %d", h->unread_count);
+ g_debug ("summary.deleted = %d", h->deleted_count);
+ g_debug ("summary.junk = %d", h->junk_count);
return TRUE;
@@ -1807,13 +1808,13 @@
}
if (version < 0) {
- tracker_error ("ERROR: summary file version too low");
+ g_critical ("summary file version too low");
return FALSE;
}
/* Right now we only support summary versions 1 through 3 */
if (version > 3) {
- tracker_error ("ERROR: reported summary version (%" G_GINT32_FORMAT ") is too new", version);
+ g_critical ("reported summary version (%" G_GINT32_FORMAT ") is too new", version);
return FALSE;
}
@@ -2324,7 +2325,7 @@
g_return_val_if_fail (db_con, FALSE);
g_return_val_if_fail (mail_msg, FALSE);
- tracker_log ("Trying to index mail \"%s\"", mail_msg->uri);
+ g_message ("Trying to index mail \"%s\"", mail_msg->uri);
if (!do_save_ondisk_email_message (db_con, mail_msg)) {
/* Mail not found... So two cases:
@@ -2344,21 +2345,21 @@
ret = FALSE;
- tracker_log ("... Trying to index mail parts");
+ g_message ("... Trying to index mail parts");
header_file = g_strconcat (mail_msg->path, "HEADER", NULL);
if (tracker_file_is_indexable (header_file)) {
/* email is on disk */
- tracker_log ("... Indexing mail parts of email \"%s\"", mail_msg->uri);
+ g_message ("... Indexing mail parts of email \"%s\"", mail_msg->uri);
ret = index_mail_parts (db_con, mail_msg, mail_msg->path);
- tracker_log ("... Treatment of mail parts of \"%s\" finished", mail_msg->uri);
+ g_message ("... Treatment of mail parts of \"%s\" finished", mail_msg->uri);
if (ret) {
tracker_db_email_save_email (db_con, mail_msg, MAIL_APP_EVOLUTION);
}
} else {
- tracker_log ("...Indexing of mail parts failed");
+ g_message ("...Indexing of mail parts failed");
}
g_free (header_file);
@@ -2366,7 +2367,7 @@
return ret;
} else {
- tracker_log ("Simple index of mail \"%s\" finished", mail_msg->uri);
+ g_message ("Simple index of mail \"%s\" finished", mail_msg->uri);
return TRUE;
}
}
@@ -2494,11 +2495,11 @@
} else{
if (tracker_file_is_indexable (m->mail_file)) {
- tracker_log ("Indexing message part \"%s\"", m->mail_file);
+ g_message ("Indexing message part \"%s\"", m->mail_file);
if (num_parts == 1 && strcmp (m->mime_infos->type, "text") == 0) {
/* it is the first mail part so it is assume to be body mail */
- tracker_log ("Message part \"%s\" will be indexed as mail body...", m->mail_file);
+ g_message ("Message part \"%s\" will be indexed as mail body...", m->mail_file);
g_file_get_contents (m->mail_file, &mail_msg->body, NULL, NULL);
} else {
@@ -2526,7 +2527,7 @@
email_add_saved_mail_attachment_to_mail_message (mail_msg, ma);
} else {
- tracker_error ("ERROR: failed to decode mail part \"%s\"", m->mail_file);
+ g_critical ("failed to decode mail part \"%s\"", m->mail_file);
email_free_mail_attachment (ma);
}
}
@@ -2827,7 +2828,7 @@
}
if (fseek (f, len - 1, SEEK_CUR) != 0) {
- tracker_error ("ERROR: seek failed for string with length %d with error code %d", len - 1, errno);
+ g_critical ("seek failed for string with length %d with error code %d", len - 1, errno);
return FALSE;
}
Modified: branches/indexer-split/src/trackerd/tracker-email-modest.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-modest.c (original)
+++ branches/indexer-split/src/trackerd/tracker-email-modest.c Tue May 20 08:15:30 2008
@@ -352,7 +352,7 @@
file_name = g_path_get_basename (info->uri);
- tracker_debug ("indexing email summary %s", info->uri);
+ g_debug ("indexing email summary %s", info->uri);
if (is_in_dir_imap (info->uri)) {
if (strcmp (file_name, "summary.mmap") == 0) {
@@ -414,11 +414,11 @@
header = NULL;
- tracker_log ("Scanning summary file %s for junk", filename);
+ g_message ("Scanning summary file %s for junk", filename);
if (!load_summary_file_header (summary, &header)) {
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary file %s", filename);
+ g_critical ("failed to open summary file %s", filename);
return;
}
@@ -426,7 +426,7 @@
if (!load_summary_file_meta_header_for_imap (summary, header)) {
free_summary_file_header (header);
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary header file %s", filename);
+ g_critical ("failed to open summary header file %s", filename);
return;
}
@@ -434,19 +434,19 @@
if (!load_summary_file_meta_header_for_pop (summary, header)) {
free_summary_file_header (header);
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary header file %s", filename);
+ g_critical ("failed to open summary header file %s", filename);
return;
}
} else if (store->type == MAIL_TYPE_MAILDIR) {
if (!load_summary_file_meta_header_for_pop (summary, header)) {
free_summary_file_header (header);
free_summary_file (summary);
- tracker_error ("ERROR: failed to open summary header file %s", filename);
+ g_critical ("failed to open summary header file %s", filename);
return;
}
} else {
- tracker_error ("ERROR: summary file not supported");
+ g_critical ("summary file not supported");
free_summary_file_header (header);
free_summary_file (summary);
return;
@@ -480,7 +480,7 @@
g_free (tmp);
if ((strcmp (d->d_name, "summary.mmap") == 0) || g_str_has_suffix (d->d_name, "summary.mmap")) {
- tracker_log ("Adding mail_dir: %s\n", name);
+ g_message ("Adding mail_dir: %s\n", name);
list = g_slist_prepend (list, g_strdup (name));
/* Question from Philip Van Hoof:
@@ -529,7 +529,7 @@
free_modest_config (*conf);
}
- tracker_log ("Checking for Modest email accounts...");
+ g_message ("Checking for Modest email accounts...");
*conf = g_slice_new0 (ModestConfig);
m_conf = *conf;
@@ -835,7 +835,7 @@
MailStore *store = tracker_db_email_get_mbox_details (db_con, dir);
if (!store) {
- tracker_error ("ERROR: could not retrieve store for file %s", dir);
+ g_critical ("could not retrieve store for file %s", dir);
free_summary_file (summary);
free_summary_file_header (header);
@@ -843,7 +843,7 @@
return;
}
- tracker_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", dir,
+ g_debug ("Number of existing messages in %s are %d, %d junk, %d deleted and header totals are %d, %d, %d", dir,
store->mail_count, store->junk_count, store->delete_count, header->saved_count, header->junk_count, header->deleted_count);
tracker->mbox_count++;
@@ -865,7 +865,7 @@
/* skip already indexed emails */
for (i = 0; i < store->mail_count; i++) {
if (!(*skip_mail) (summary)) {
- tracker_error ("ERROR: skipping email no. %d in summary file", i+1);
+ g_critical ("skipping email no. %d in summary file", i+1);
tracker_db_email_free_mail_store (store);
free_summary_file (summary);
free_summary_file_header (header);
@@ -884,10 +884,10 @@
MailMessage *mail_msg = NULL;
mail_count++;
- tracker_debug ("processing email no. %d / %" G_GINT32_FORMAT, store->mail_count + 1, header->saved_count);
+ g_debug ("processing email no. %d / %" G_GINT32_FORMAT, store->mail_count + 1, header->saved_count);
if (!(*load_mail) (summary, &mail_msg)) {
- tracker_error ("ERROR: loading email no. %d in summary file", mail_count);
+ g_critical ("loading email no. %d in summary file", mail_count);
tracker_db_email_free_mail_store (store);
free_summary_file (summary);
free_summary_file_header (header);
@@ -916,10 +916,10 @@
mail_msg->store = store;
if (!(*save_ondisk_mail) (db_con, mail_msg)) {
- tracker_log ("WARNING: Message, or message parts, could not be found locally - if you are using IMAP make sure you have selected the \"copy folder content locally for offline operation\" option in Modest");
+ g_message ("WARNING: Message, or message parts, could not be found locally - if you are using IMAP make sure you have selected the \"copy folder content locally for offline operation\" option in Modest");
/* we do not have all infos but we still save them */
if (!tracker_db_email_save_email (db_con, mail_msg, MAIL_APP_MODEST)) {
- tracker_log ("Failed to save email");
+ g_message ("Failed to save email");
}
}
@@ -967,7 +967,7 @@
}
- tracker_log ("No. of new emails indexed in summary file %s is %d, %d junk, %d deleted", dir, mail_count, junk_count, delete_count);
+ g_message ("No. of new emails indexed in summary file %s is %d, %d junk, %d deleted", dir, mail_count, junk_count, delete_count);
tracker_db_email_set_message_counts (db_con, dir, store->mail_count, store->junk_count, store->delete_count);
@@ -1074,17 +1074,17 @@
goto error;
}
- tracker_debug ("summary.version = %d", h->version);
+ g_debug ("summary.version = %d", h->version);
if (h->version > 0xff && (h->version & 0xff) < 12) {
- tracker_error ("ERROR: summary file header version too low");
+ g_critical ("summary file header version too low");
goto error;
}
h->legacy = !(h->version < 0x100 && h->version >= 13);
if (h->legacy) {
- tracker_debug ("WARNING: summary file is a legacy version");
+ g_debug ("WARNING: summary file is a legacy version");
}
@@ -1095,10 +1095,10 @@
goto error;
}
- tracker_debug ("summary.flags = %d", h->flags);
- tracker_debug ("summary.nextuid = %d", h->nextuid);
- tracker_debug ("summary.time = %d", h->time);
- tracker_debug ("summary.count = %" G_GINT32_FORMAT, h->saved_count);
+ g_debug ("summary.flags = %d", h->flags);
+ g_debug ("summary.nextuid = %d", h->nextuid);
+ g_debug ("summary.time = %d", (gint) h->time);
+ g_debug ("summary.count = %" G_GINT32_FORMAT, h->saved_count);
if (!h->legacy) {
if (!decode_gint32 (f, &h->unread_count) ||
@@ -1108,9 +1108,9 @@
}
}
- tracker_debug ("summary.Unread = %d", h->unread_count);
- tracker_debug ("summary.deleted = %d", h->deleted_count);
- tracker_debug ("summary.junk = %d", h->junk_count);
+ g_debug ("summary.Unread = %d", h->unread_count);
+ g_debug ("summary.deleted = %d", h->deleted_count);
+ g_debug ("summary.junk = %d", h->junk_count);
return TRUE;
@@ -1156,13 +1156,13 @@
}
if (version < 0) {
- tracker_error ("ERROR: summary file version too low");
+ g_critical ("summary file version too low");
return FALSE;
}
/* Right now we only support summary versions 1 through 3 */
if (version > 3) {
- tracker_error ("ERROR: reported summary version (%" G_GINT32_FORMAT ") is too new", version);
+ g_critical ("reported summary version (%" G_GINT32_FORMAT ") is too new", version);
return FALSE;
}
@@ -1211,13 +1211,13 @@
}
if (version < 0) {
- tracker_error ("ERROR: summary file version too low");
+ g_critical ("summary file version too low");
return FALSE;
}
/* Right now we only support summary versions 1 through 3 */
if (version > 3) {
- tracker_error ("ERROR: reported summary version (%" G_GINT32_FORMAT ") is too new", version);
+ g_critical ("reported summary version (%" G_GINT32_FORMAT ") is too new", version);
return FALSE;
}
@@ -1729,13 +1729,13 @@
g_return_val_if_fail (db_con, FALSE);
g_return_val_if_fail (mail_msg, FALSE);
- tracker_log ("Trying to index mail \"%s\"", mail_msg->uri);
+ g_message ("Trying to index mail \"%s\"", mail_msg->uri);
if (!do_save_ondisk_email_message (db_con, mail_msg)) {
- tracker_log ("Indexing mail without body nor attachment parsing \"%s\"", mail_msg->uri);
+ g_message ("Indexing mail without body nor attachment parsing \"%s\"", mail_msg->uri);
tracker_db_email_save_email (db_con, mail_msg, MAIL_APP_MODEST);
} else {
- tracker_log ("Simple index of mail \"%s\" finished", mail_msg->uri);
+ g_message ("Simple index of mail \"%s\" finished", mail_msg->uri);
}
@@ -1931,7 +1931,7 @@
* whereas this character is not present in Evolution's format */
if (fseek (f, len /*- 1*/, SEEK_CUR) != 0) {
- tracker_error ("ERROR: seek failed for string with length %d with error code %d", len - 1, errno);
+ g_critical ("seek failed for string with length %d with error code %d", len - 1, errno);
return FALSE;
}
Modified: branches/indexer-split/src/trackerd/tracker-email-utils.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-email-utils.c (original)
+++ branches/indexer-split/src/trackerd/tracker-email-utils.c Tue May 20 08:15:30 2008
@@ -62,14 +62,12 @@
void
email_unwatch_directory (const gchar *dir, const gchar *service)
{
- tracker_log ("Registering path %s as belonging to service %s", dir, service);
tracker_ontology_remove_dir_to_service_type (service, dir);
}
void
email_watch_directory (const gchar *dir, const gchar *service)
{
- tracker_log ("Registering path %s as belonging to service %s", dir, service);
tracker_ontology_add_dir_to_service_type (service, dir);
}
@@ -188,7 +186,7 @@
GObject *object;
if (tracker_config_get_verbosity (tracker->config) == 1) {
- tracker_log ("indexing #%d - Emails in %s", tracker->index_count, path);
+ g_message ("indexing #%d - Emails in %s", tracker->index_count, path);
}
if (tracker->index_count % 2500 == 0) {
@@ -225,7 +223,7 @@
tracker->mbox_count);
if (indexed > 0) {
- tracker_info ("Indexed %d emails in email store %s and ignored %d junk and %d deleted emails",
+ g_message ("Indexed %d emails in email store:'%s' and ignored %d junk and %d deleted emails",
indexed, path, junk, deleted);
return TRUE;
@@ -780,7 +778,7 @@
mail_msg->attachments = g_slist_prepend (mail_msg->attachments, ma);
- tracker_debug ("saved email attachment \"%s\"", ma->tmp_decoded_file);
+ g_debug ("saved email attachment \"%s\"", ma->tmp_decoded_file);
return TRUE;
}
@@ -931,7 +929,7 @@
path_in_locale = g_filename_from_utf8 (path, -1, NULL, NULL, NULL);
if (!path_in_locale) {
- tracker_error ("ERROR: src or dst could not be converted to locale format");
+ g_critical ("src or dst could not be converted to locale format");
g_free (path_in_locale);
return NULL;
}
@@ -1059,7 +1057,7 @@
if (g_str_has_suffix (filename, "signature.asc")) {
return;
} else {
- tracker_info ("attached filename is %s", filename);
+ g_message ("Attached filename is:'%s'", filename);
}
attachment_uri = email_make_tmp_name_for_mail_attachment (filename);
@@ -1070,7 +1068,7 @@
fd = g_open (locale_uri, (O_CREAT | O_TRUNC | O_WRONLY), 0666);
if (fd == -1) {
- tracker_error ("ERROR: failed to save attachment %s", locale_uri);
+ g_critical ("failed to save attachment %s", locale_uri);
g_free (attachment_uri);
g_free (locale_uri);
return;
Modified: branches/indexer-split/src/trackerd/tracker-hal.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-hal.c (original)
+++ branches/indexer-split/src/trackerd/tracker-hal.c Tue May 20 08:15:30 2008
@@ -159,19 +159,19 @@
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not get the system DBus connection, %s",
- error.message);
+ g_critical ("Could not get the system DBus connection, %s",
+ error.message);
dbus_error_free (&error);
return;
}
dbus_connection_setup_with_g_main (connection, NULL);
- tracker_debug ("Initializing HAL...");
+ g_message ("Initializing HAL...");
priv->context = libhal_ctx_new ();
if (!priv->context) {
- tracker_error ("Could not create HAL context");
+ g_critical ("Could not create HAL context");
return;
}
@@ -180,12 +180,12 @@
if (!libhal_ctx_init (priv->context, &error)) {
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not initialise the HAL context, %s",
- error.message);
+ g_critical ("Could not initialise the HAL context, %s",
+ error.message);
dbus_error_free (&error);
} else {
- tracker_error ("Could not initialise the HAL context, "
- "no error, is hald running?");
+ g_critical ("Could not initialise the HAL context, "
+ "no error, is hald running?");
}
libhal_ctx_free (priv->context);
@@ -208,7 +208,7 @@
(GDestroyNotify) g_free);
/* Volume and property notification callbacks */
- tracker_debug ("HAL monitors set for devices added/removed/mounted/umounted...");
+ g_message ("HAL monitors set for devices added/removed/mounted/umounted...");
libhal_ctx_set_device_added (priv->context, hal_device_added_cb);
libhal_ctx_set_device_removed (priv->context, hal_device_removed_cb);
libhal_ctx_set_device_property_modified (priv->context, hal_device_property_modified_cb);
@@ -284,14 +284,14 @@
&error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not get devices with 'volume' capability, %s",
- error.message);
+ g_critical ("Could not get devices with 'volume' capability, %s",
+ error.message);
dbus_error_free (&error);
return FALSE;
}
if (!devices || !devices[0]) {
- tracker_log ("HAL devices not found with 'volume' capability");
+ g_message ("HAL devices not found with 'volume' capability");
return TRUE;
}
@@ -303,21 +303,21 @@
continue;
}
- tracker_debug ("HAL device found:\n"
- " - udi : %s\n"
- " - mount point: %s\n"
- " - device file: %s\n"
- " - uuid : %s\n"
- " - mounted : %s\n"
- " - file system: %s\n"
- " - label : %s",
- libhal_volume_get_udi (volume),
- libhal_volume_get_mount_point (volume),
- libhal_volume_get_device_file (volume),
- libhal_volume_get_uuid (volume),
- libhal_volume_is_mounted (volume) ? "yes" : "no",
- libhal_volume_get_fstype (volume),
- libhal_volume_get_label (volume));
+ g_message ("HAL device found:\n"
+ " - udi : %s\n"
+ " - mount point: %s\n"
+ " - device file: %s\n"
+ " - uuid : %s\n"
+ " - mounted : %s\n"
+ " - file system: %s\n"
+ " - label : %s",
+ libhal_volume_get_udi (volume),
+ libhal_volume_get_mount_point (volume),
+ libhal_volume_get_device_file (volume),
+ libhal_volume_get_uuid (volume),
+ libhal_volume_is_mounted (volume) ? "yes" : "no",
+ libhal_volume_get_fstype (volume),
+ libhal_volume_get_label (volume));
hal_device_add (hal, volume);
libhal_volume_free (volume);
@@ -346,13 +346,13 @@
&error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not get AC adapter capable devices, %s",
- error.message);
+ g_critical ("Could not get AC adapter capable devices, %s",
+ error.message);
dbus_error_free (&error);
return FALSE;
}
- tracker_log ("HAL found %d AC adapter capable devices", num);
+ g_message ("HAL found %d AC adapter capable devices", num);
if (!devices || !devices[0]) {
libhal_free_string_array (devices);
@@ -367,9 +367,9 @@
if (!priv->battery_udi) {
/* For now just use the first one we find */
priv->battery_udi = g_strdup (*p);
- tracker_log (" - Device '%s' (default)", *p);
+ g_message (" - Device '%s' (default)", *p);
} else {
- tracker_log (" - Device '%s'", *p);
+ g_message (" - Device '%s'", *p);
}
}
@@ -381,7 +381,7 @@
&error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not add device:'%s' to property watch, %s",
+ g_critical ("Could not add device:'%s' to property watch, %s",
priv->battery_udi, error.message);
dbus_error_free (&error);
return FALSE;
@@ -393,7 +393,7 @@
PROP_AC_ADAPTER_ON,
NULL);
- tracker_log ("HAL reports system is currently powered by %s",
+ g_message ("HAL reports system is currently powered by %s",
priv->battery_in_use ? "battery" : "AC adapter");
return TRUE;
@@ -409,7 +409,7 @@
priv = GET_PRIV (hal);
- tracker_log ("HAL device with mount point:'%s', removable:%s now being tracked",
+ g_message ("HAL device with mount point:'%s', removable:%s now being tracked",
mount_point,
removable_device ? "yes" : "no");
@@ -440,7 +440,7 @@
return;
}
- tracker_log ("HAL device with mount point:'%s', removable:%s NO LONGER being tracked",
+ g_message ("HAL device with mount point:'%s', removable:%s NO LONGER being tracked",
mount_point,
g_hash_table_remove (priv->removable_devices, udi) ? "yes" : "no");
@@ -569,11 +569,11 @@
libhal_drive_free (drive);
if (!eligible) {
- tracker_debug ("HAL device is not eligible, type is '%s'",
- hal_drive_type_to_string (drive_type));
+ g_message ("HAL device is not eligible, type is '%s'",
+ hal_drive_type_to_string (drive_type));
} else {
- tracker_debug ("HAL device is eligible, type is '%s'",
- hal_drive_type_to_string (drive_type));
+ g_message ("HAL device is eligible, type is '%s'",
+ hal_drive_type_to_string (drive_type));
}
return eligible;
@@ -603,7 +603,7 @@
/* If there is no mount point, then there is nothing to track */
if (!hal_device_should_be_tracked (hal, device_file)) {
- tracker_log ("HAL device should not be tracked (not eligible)");
+ g_message ("HAL device should not be tracked (not eligible)");
return TRUE;
}
@@ -611,7 +611,7 @@
libhal_device_add_property_watch (priv->context, udi, &error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not add device property watch for udi:'%s', %s",
+ g_critical ("Could not add device property watch for udi:'%s', %s",
udi, error.message);
dbus_error_free (&error);
return FALSE;
@@ -647,7 +647,7 @@
return;
}
- tracker_log ("HAL device added:\n"
+ g_message ("HAL device added:\n"
" - udi : %s\n"
" - mount point: %s\n"
" - device file: %s\n"
@@ -689,7 +689,7 @@
mount_point = g_hash_table_lookup (priv->mounted_devices, udi);
- tracker_log ("HAL device removed:\n"
+ g_message ("HAL device removed:\n"
" - udi : %s\n"
" - mount point: %s\n"
" - device_file: %s",
@@ -723,7 +723,7 @@
if (!device_is_battery &&
!g_hash_table_lookup (priv->all_devices, udi)) {
- tracker_debug ("HAL device property change for another device, ignoring");
+ g_message ("HAL device property change for another device, ignoring");
return;
}
@@ -739,13 +739,13 @@
&error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not device property:'%s' for udi:'%s', %s",
- udi, PROP_AC_ADAPTER_ON, error.message);
+ g_critical ("Could not device property:'%s' for udi:'%s', %s",
+ udi, PROP_AC_ADAPTER_ON, error.message);
dbus_error_free (&error);
return;
}
- tracker_log ("HAL reports system is now powered by %s",
+ g_message ("HAL reports system is now powered by %s",
priv->battery_in_use ? "battery" : "AC adapter");
/* If we have come off battery power wakeup index thread */
@@ -755,8 +755,8 @@
} else {
gboolean is_mounted;
- tracker_debug ("HAL device property change for udi:'%s' and key:'%s'",
- udi, key);
+ g_message ("HAL device property change for udi:'%s' and key:'%s'",
+ udi, key);
if (strcmp (key, PROP_IS_MOUNTED) != 0) {
return;
@@ -768,8 +768,8 @@
&error);
if (dbus_error_is_set (&error)) {
- tracker_error ("Could not get device property:'%s' for udi:'%s', %s",
- udi, key, error.message);
+ g_critical ("Could not get device property:'%s' for udi:'%s', %s",
+ udi, key, error.message);
dbus_error_free (&error);
return;
}
@@ -783,7 +783,7 @@
mount_point = libhal_volume_get_mount_point (volume);
device_file = libhal_volume_get_device_file (volume);
- tracker_log ("HAL device with udi:'%s' is now mounted",
+ g_message ("HAL device with udi:'%s' is now mounted",
udi);
hal_mount_point_add (hal,
@@ -793,7 +793,7 @@
libhal_volume_free (volume);
} else {
- tracker_log ("HAL device with udi:'%s' is now unmounted",
+ g_message ("HAL device with udi:'%s' is now unmounted",
udi);
hal_mount_point_remove (hal, udi);
@@ -847,9 +847,9 @@
volume = libhal_volume_from_udi (gr->context, udi);
if (!volume) {
- tracker_debug ("HAL device with udi:'%s' has no volume, "
- "should we delete?",
- udi);
+ g_message ("HAL device with udi:'%s' has no volume, "
+ "should we delete?",
+ udi);
return;
}
Modified: branches/indexer-split/src/trackerd/tracker-index-stage.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-index-stage.c (original)
+++ branches/indexer-split/src/trackerd/tracker-index-stage.c Tue May 20 08:15:30 2008
@@ -116,9 +116,9 @@
void
tracker_index_stage_set (TrackerIndexStage new_stage)
{
- tracker_log ("Index stage changing from '%s' to '%s'",
- tracker_index_stage_to_string (index_stage),
- tracker_index_stage_to_string (new_stage));
+ g_message ("Index stage changing from '%s' to '%s'",
+ tracker_index_stage_to_string (index_stage),
+ tracker_index_stage_to_string (new_stage));
index_stage = new_stage;
}
Modified: branches/indexer-split/src/trackerd/tracker-indexer.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-indexer.c (original)
+++ branches/indexer-split/src/trackerd/tracker-indexer.c Tue May 20 08:15:30 2008
@@ -136,7 +136,7 @@
result *= bucket_ratio;
}
- tracker_log ("Preferred bucket count is %d", result);
+ g_message ("Preferred bucket count is %d", result);
return result;
}
@@ -161,7 +161,7 @@
if (!name) return NULL;
- tracker_log ("Opening index %s", name);
+ g_message ("Opening index %s", name);
if (strstr (name, "tmp")) {
word_index = dpopen (name, DP_OWRITER | DP_OCREAT | DP_ONOLCK,
@@ -172,7 +172,7 @@
}
if (!word_index) {
- tracker_error ("%s index was not closed properly and caused error %s- attempting repair", name, dperrmsg (dpecode));
+ g_critical ("%s index was not closed properly and caused error %s- attempting repair", name, dperrmsg (dpecode));
if (dprepair (name)) {
word_index = dpopen (name, DP_OWRITER | DP_OCREAT | DP_ONOLCK,
tracker_config_get_min_bucket_count (tracker->config));
@@ -232,7 +232,7 @@
bucket_count = dpbnum (result->word_index);
rec_count = dprnum (result->word_index);
- tracker_log ("Bucket count (max is %d) is %d and Record Count is %d",
+ g_message ("Bucket count (max is %d) is %d and Record Count is %d",
tracker_config_get_max_bucket_count (tracker->config),
bucket_count, rec_count);
@@ -248,7 +248,7 @@
g_mutex_lock (indexer->word_mutex);
if (!dpclose (indexer->word_index)) {
- tracker_log ("Index closure has failed due to %s", dperrmsg (dpecode));
+ g_message ("Index closure has failed due to %s", dperrmsg (dpecode));
}
g_mutex_unlock (indexer->word_mutex);
@@ -332,23 +332,29 @@
tracker_config_get_max_bucket_count (tracker->config));
b_count = num / tracker_config_get_divisions (tracker->config);
- tracker_log ("No. of buckets per division is %d", b_count);
+ g_message ("No. of buckets per division is %d", b_count);
- tracker_log ("Please wait while optimization of indexes takes place...");
- tracker_log ("Index has file size %10.0f and bucket count of %d of which %d are used...", tracker_indexer_size (indexer), dpbnum (indexer->word_index), dpbusenum (indexer->word_index));
+ g_message ("Please wait while optimization of indexes takes place...");
+ g_message ("Index has file size %d and bucket count of %d of which %d are used...",
+ tracker_indexer_size (indexer),
+ dpbnum (indexer->word_index),
+ dpbusenum (indexer->word_index));
g_mutex_lock (indexer->word_mutex);
if (!dpoptimize (indexer->word_index, b_count)) {
g_mutex_unlock (indexer->word_mutex);
- tracker_log ("Optimization has failed due to %s", dperrmsg (dpecode));
+ g_message ("Optimization has failed due to %s", dperrmsg (dpecode));
return FALSE;
}
g_mutex_unlock (indexer->word_mutex);
- tracker_log ("Index has been successfully optimized to file size %10.0f and with bucket count of %d of which %d are used...", tracker_indexer_size (indexer), dpbnum (indexer->word_index), dpbusenum (indexer->word_index));
+ g_message ("Index has been successfully optimized to file size %d and with bucket count of %d of which %d are used...",
+ tracker_indexer_size (indexer),
+ dpbnum (indexer->word_index),
+ dpbusenum (indexer->word_index));
return TRUE;
@@ -378,7 +384,7 @@
int i = 0, interval;
int buff_size = MAX_HITS_FOR_WORD * sz;
- tracker_log ("applying incremental changes to indexes");
+ g_message ("applying incremental changes to indexes");
guint32 size = tracker_indexer_size (dest);
@@ -438,7 +444,7 @@
if (bytes < 1) continue;
if (bytes % sz != 0) {
- tracker_error ("possible corruption found during application of changes to index with word %s (ignoring update for this word)", str);
+ g_critical ("possible corruption found during application of changes to index with word %s (ignoring update for this word)", str);
continue;
}
@@ -539,7 +545,7 @@
{
if (!src_index || !dest_index) {
- tracker_error ("cannot move indexes");
+ g_critical ("cannot move indexes");
return;
}
@@ -556,14 +562,14 @@
/* rename and reopen final index as main index */
- tracker_log ("renaming %s to %s", final_name, fname);
+ g_message ("renaming %s to %s", final_name, fname);
rename (final_name, fname);
dest_index->word_index = open_index (fname);
if (!dest_index->word_index) {
- tracker_error ("index creation failure for %s from %s", fname, final_name);
+ g_critical ("index creation failure for %s from %s", fname, final_name);
}
g_free (final_name);
@@ -661,7 +667,7 @@
return;
}
- tracker_log ("starting merge of %d indexes", index_count);
+ g_message ("starting merge of %d indexes", index_count);
tracker->in_merge = TRUE;
tracker->merge_count = index_count;
tracker->merge_processed = 0;
@@ -709,7 +715,7 @@
if (!final_index) {
g_slist_free (index_list);
- tracker_error ("could not open final index - abandoning index merge");
+ g_critical ("could not open final index - abandoning index merge");
goto end_of_merging;
}
@@ -779,7 +785,7 @@
}
if (offset % sz != 0) {
- tracker_error ("possible corruption found during merge of word %s - purging word from index (it will not be searchable)", str);
+ g_critical ("possible corruption found during merge of word %s - purging word from index (it will not be searchable)", str);
continue;
}
@@ -798,7 +804,7 @@
gint tmp_offset = dpgetwb (tmp_index->word_index, str, -1, 0, (buff_size - offset), tmp_buffer);
if (tmp_offset > 0 && (tmp_offset % sz != 0)) {
- tracker_error ("possible corruption found during merge of word %s - purging word from index", str);
+ g_critical ("possible corruption found during merge of word %s - purging word from index", str);
continue;
}
@@ -1032,7 +1038,7 @@
/* add hits that could not be updated directly here so they can be appended later */
if (!edited) {
list = g_slist_prepend (list, &detail_chunk[j]);
- tracker_debug ("could not update word hit %s - appending", word);
+ g_debug ("could not update word hit %s - appending", word);
}
}
@@ -1366,7 +1372,7 @@
winner_dist = dist;
} else {
- tracker_log ("No hits for %s!", str);
+ g_message ("No hits for %s!", str);
}
}
@@ -1375,7 +1381,7 @@
g_get_current_time (¤t);
if (current.tv_sec - start.tv_sec >= 2) { /* 2 second time out */
- tracker_log ("Timeout in tracker_dbus_method_search_suggest");
+ g_message ("Timeout in tracker_dbus_method_search_suggest");
break;
}
@@ -1397,7 +1403,7 @@
g_free (filename);
if (too_big) {
- tracker_error ("File index database is too big, discontinuing indexing");
+ g_critical ("File index database is too big, discontinuing indexing");
return TRUE;
}
@@ -1406,7 +1412,7 @@
g_free (filename);
if (too_big) {
- tracker_error ("Email index database is too big, discontinuing indexing");
+ g_critical ("Email index database is too big, discontinuing indexing");
return TRUE;
}
@@ -1414,7 +1420,7 @@
too_big = tracker_file_get_size (filename_const) > MAX_INDEX_FILE_SIZE;
if (too_big) {
- tracker_error ("File metadata database is too big, discontinuing indexing");
+ g_critical ("File metadata database is too big, discontinuing indexing");
return TRUE;
}
@@ -1422,7 +1428,7 @@
too_big = tracker_file_get_size (filename_const) > MAX_INDEX_FILE_SIZE;
if (too_big) {
- tracker_error ("Email metadata database is too big, discontinuing indexing");
+ g_critical ("Email metadata database is too big, discontinuing indexing");
return TRUE;
}
Modified: branches/indexer-split/src/trackerd/tracker-inotify.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-inotify.c (original)
+++ branches/indexer-split/src/trackerd/tracker-inotify.c Tue May 20 08:15:30 2008
@@ -168,13 +168,15 @@
moved_from_info = (TrackerDBFileInfo *) tmp->data;
if (!moved_from_info) {
- tracker_error ("ERROR: bad FileInfo struct found in move list. Skipping...");
+ g_critical ("bad FileInfo struct found in move list. Skipping...");
continue;
}
if ((cookie > 0) && (moved_from_info->cookie == cookie)) {
- tracker_info ("found matching inotify pair from %s to %s", moved_from_info->uri, moved_to_info->uri);
+ g_message ("Found matching inotify pair from:'%s' to:'%s'",
+ moved_from_info->uri,
+ moved_to_info->uri);
tracker->grace_period = 2;
tracker->request_waiting = TRUE;
@@ -195,7 +197,8 @@
}
/* matching pair not found so treat as a create action */
- tracker_debug ("no matching pair found for inotify move event for %s", info->uri);
+ g_debug ("no matching pair found for inotify move event for %s",
+ info->uri);
if (tracker_file_is_directory (info->uri)) {
info->action = TRACKER_DB_ACTION_DIRECTORY_CREATED;
} else {
@@ -207,16 +210,16 @@
} else if (action == TRACKER_DB_ACTION_WRITABLE_FILE_CLOSED) {
tracker_add_io_grace (info->uri);
- tracker_info ("File %s has finished changing", info->uri);
+ g_message ("File:'%s' has finished changing", info->uri);
tracker_db_insert_pending_file (main_thread_db_con, info->file_id, info->uri, NULL, info->mime, 0, info->action, info->is_directory, TRUE, -1);
tracker_db_file_info_free (info);
return;
}
- tracker_log ("WARNING: not processing event %s for uri %s",
- tracker_db_action_to_string (info->action),
- info->uri);
+ g_warning ("Not processing event:'%s' for uri:'%s'",
+ tracker_db_action_to_string (info->action),
+ info->uri);
tracker_db_file_info_free (info);
}
@@ -380,7 +383,7 @@
}
if (tracker_is_empty_string (filename)) {
- //tracker_log ("WARNING: inotify event has no filename");
+ //g_message ("WARNING: inotify event has no filename");
g_free (event);
continue;
}
@@ -388,7 +391,7 @@
file_utf8_uri = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
if (tracker_is_empty_string (file_utf8_uri)) {
- tracker_error ("ERROR: file uri could not be converted to utf8 format");
+ g_critical ("file uri could not be converted to utf8 format");
g_free (event);
continue;
}
@@ -401,7 +404,7 @@
dir_utf8_uri = g_filename_to_utf8 (monitor_name, -1, NULL, NULL, NULL);
if (!dir_utf8_uri) {
- tracker_error ("Error: file uri could not be converted to utf8 format");
+ g_critical ("file uri could not be converted to utf8 format");
g_free (file_utf8_uri);
g_free (event);
continue;
@@ -417,7 +420,7 @@
tracker_process_files_should_be_watched (tracker->config, str)) {
process_event (str, tracker_file_is_directory (str), action_type, cookie);
} else {
- tracker_debug ("ignoring action %d on file %s", action_type, str);
+ g_debug ("ignoring action %d on file %s", action_type, str);
}
if (monitor_name) {
@@ -455,7 +458,7 @@
r = read (fd, buffer, 16384);
if (r <= 0) {
- tracker_error ("ERROR: inotify system failure - unable to watch files");
+ g_critical ("inotify system failure - unable to watch files");
return FALSE;
}
@@ -505,7 +508,7 @@
/* leave 500 watches for other users */
tracker->watch_limit = atoi (limit) - 500;
- tracker_log ("Setting inotify watch limit to %d.", tracker->watch_limit);
+ g_message ("Setting inotify watch limit to %d.", tracker->watch_limit);
g_free (limit);
}
}
@@ -548,7 +551,7 @@
if (tracker_count_watch_dirs () >= (int) tracker->watch_limit) {
if (!limit_exceeded_msg) {
- tracker_log ("Inotify Watch Limit has been exceeded - for best results you should increase number of inotify watches on your system");
+ g_message ("Inotify Watch Limit has been exceeded - for best results you should increase number of inotify watches on your system");
limit_exceeded_msg = TRUE;
}
@@ -568,7 +571,7 @@
g_free (dir_in_locale);
if (wd < 0) {
- tracker_error ("ERROR: Inotify watch on %s has failed", dir);
+ g_critical ("Inotify watch on %s has failed", dir);
return FALSE;
}
@@ -576,7 +579,7 @@
tracker_exec_proc (db_con->cache, "InsertWatch", dir, str_wd, NULL);
g_free (str_wd);
inotify_count++;
- tracker_log ("Watching directory %s (total watches = %d)", dir, inotify_count);
+ g_message ("Watching directory %s (total watches = %d)", dir, inotify_count);
return TRUE;
}
@@ -599,7 +602,7 @@
wd = -1;
if (!result_set) {
- tracker_log ("WARNING: watch id not found for uri %s", dir);
+ g_message ("WARNING: watch id not found for uri %s", dir);
return FALSE;
}
Modified: branches/indexer-split/src/trackerd/tracker-ioprio.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-ioprio.c (original)
+++ branches/indexer-split/src/trackerd/tracker-ioprio.c Tue May 20 08:15:30 2008
@@ -132,14 +132,12 @@
void
ioprio (void)
{
-
-
- tracker_log ("Setting ioprio...");
+ g_message ("Setting ioprio...");
if (set_io_priority_idle () == -1) {
g_print ("Could not set idle IO priority...attempting best effort 7 priority\n");
if (set_io_priority_best_effort (7) == -1) {
- tracker_error ("ERROR: ioprio_set failed");
+ g_warning ("Could not set IO priority");
}
}
Modified: branches/indexer-split/src/trackerd/tracker-main.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-main.c (original)
+++ branches/indexer-split/src/trackerd/tracker-main.c Tue May 20 08:15:30 2008
@@ -111,15 +111,15 @@
* threads are waiting to process them.
*/
-#define ABOUT \
- "Tracker " VERSION "\n" \
+#define ABOUT \
+ "Tracker " VERSION "\n" \
"Copyright (c) 2005-2008 Jamie McCracken (jamiemcc gnome org)\n"
-#define LICENSE \
+#define LICENSE \
"This program is free software and comes without any warranty.\n" \
- "It is licensed under version 2 or later of the General Public " \
- "License which can be viewed at:\n" \
- "\n" \
+ "It is licensed under version 2 or later of the General Public " \
+ "License which can be viewed at:\n" \
+ "\n" \
" http://www.gnu.org/licenses/gpl.txt\n"
/* Public */
@@ -138,7 +138,6 @@
static gchar *language;
static gboolean disable_indexing;
static gboolean reindex;
-static gboolean fatal_errors;
static gboolean low_memory;
static gint throttle = -1;
static gint verbosity = -1;
@@ -189,10 +188,6 @@
G_OPTION_ARG_NONE, &reindex,
N_("Force a re-index of all content"),
NULL },
- { "fatal-errors", 'f', 0,
- G_OPTION_ARG_NONE, &fatal_errors,
- N_("Make tracker errors fatal"),
- NULL },
{ NULL }
};
@@ -252,7 +247,7 @@
return;
}
- tracker_log ("Resetting black list file:'%s'", uri);
+ g_message ("Resetting black list file:'%s'", uri);
/* Reset mtime on parent folder of all outstanding black list
* files so they get indexed when next restarted
@@ -274,14 +269,14 @@
GSList *l;
if (!list) {
- tracker_log ("%s: NONE!", str);
+ g_message ("%s: NONE!", str);
return;
}
- tracker_log ("%s:", str);
+ g_message ("%s:", str);
for (l = list; l; l = l->next) {
- tracker_log (" %s", l->data);
+ g_message (" %s", (gchar*) l->data);
}
}
@@ -311,62 +306,62 @@
tracker->max_extract_queue_size = 500;
}
- tracker_log ("Tracker configuration options:");
- tracker_log (" Verbosity ............................ %d",
- tracker_config_get_verbosity (tracker->config));
- tracker_log (" Low memory mode ...................... %s",
- tracker_config_get_low_memory_mode (tracker->config) ? "yes" : "no");
- tracker_log (" Indexing enabled ..................... %s",
- tracker_config_get_enable_indexing (tracker->config) ? "yes" : "no");
- tracker_log (" Watching enabled ..................... %s",
- tracker_config_get_enable_watches (tracker->config) ? "yes" : "no");
- tracker_log (" File content indexing enabled ........ %s",
- tracker_config_get_enable_content_indexing (tracker->config) ? "yes" : "no");
- tracker_log (" Thumbnailing enabled ................. %s",
- tracker_config_get_enable_thumbnails (tracker->config) ? "yes" : "no");
- tracker_log (" Email client to index ................. %s",
- tracker_config_get_email_client (tracker->config));
-
- tracker_log ("Tracker indexer parameters:");
- tracker_log (" Indexer language code ................ %s",
- tracker_config_get_language (tracker->config));
- tracker_log (" Stemmer enabled ...................... %s",
- tracker_config_get_enable_stemmer (tracker->config) ? "yes" : "no");
- tracker_log (" Fast merges enabled .................. %s",
- tracker_config_get_fast_merges (tracker->config) ? "yes" : "no");
- tracker_log (" Disable indexing on battery............ %s (initially = %s)",
- tracker_config_get_disable_indexing_on_battery (tracker->config) ? "yes" : "no",
- tracker_config_get_disable_indexing_on_battery_init (tracker->config) ? "yes" : "no");
+ g_message ("Tracker configuration options:");
+ g_message (" Verbosity ............................ %d",
+ tracker_config_get_verbosity (tracker->config));
+ g_message (" Low memory mode ...................... %s",
+ tracker_config_get_low_memory_mode (tracker->config) ? "yes" : "no");
+ g_message (" Indexing enabled ..................... %s",
+ tracker_config_get_enable_indexing (tracker->config) ? "yes" : "no");
+ g_message (" Watching enabled ..................... %s",
+ tracker_config_get_enable_watches (tracker->config) ? "yes" : "no");
+ g_message (" File content indexing enabled ........ %s",
+ tracker_config_get_enable_content_indexing (tracker->config) ? "yes" : "no");
+ g_message (" Thumbnailing enabled ................. %s",
+ tracker_config_get_enable_thumbnails (tracker->config) ? "yes" : "no");
+ g_message (" Email client to index ................. %s",
+ tracker_config_get_email_client (tracker->config));
+
+ g_message ("Tracker indexer parameters:");
+ g_message (" Indexer language code ................ %s",
+ tracker_config_get_language (tracker->config));
+ g_message (" Stemmer enabled ...................... %s",
+ tracker_config_get_enable_stemmer (tracker->config) ? "yes" : "no");
+ g_message (" Fast merges enabled .................. %s",
+ tracker_config_get_fast_merges (tracker->config) ? "yes" : "no");
+ g_message (" Disable indexing on battery............ %s (initially = %s)",
+ tracker_config_get_disable_indexing_on_battery (tracker->config) ? "yes" : "no",
+ tracker_config_get_disable_indexing_on_battery_init (tracker->config) ? "yes" : "no");
if (tracker_config_get_low_disk_space_limit (tracker->config) == -1) {
- tracker_log (" Low disk space limit .................. Disabled");
+ g_message (" Low disk space limit .................. Disabled");
} else {
- tracker_log (" Low disk space limit .................. %d%%",
- tracker_config_get_low_disk_space_limit (tracker->config));
+ g_message (" Low disk space limit .................. %d%%",
+ tracker_config_get_low_disk_space_limit (tracker->config));
}
- tracker_log (" Minimum index word length ............ %d",
- tracker_config_get_min_word_length (tracker->config));
- tracker_log (" Maximum index word length ............ %d",
- tracker_config_get_max_word_length (tracker->config));
- tracker_log (" Maximum text to index ................. %d",
- tracker_config_get_max_text_to_index (tracker->config));
- tracker_log (" Maximum words to index ................ %d",
- tracker_config_get_max_words_to_index (tracker->config));
- tracker_log (" Maximum bucket count .................. %d",
- tracker_config_get_max_bucket_count (tracker->config));
- tracker_log (" Minimum bucket count .................. %d",
- tracker_config_get_min_bucket_count (tracker->config));
- tracker_log (" Divisions ............................. %d",
- tracker_config_get_divisions (tracker->config));
- tracker_log (" Padding ............................... %d",
- tracker_config_get_padding (tracker->config));
- tracker_log (" Optimization sweep count .............. %d",
- tracker_config_get_optimization_sweep_count (tracker->config));
- tracker_log (" Thread stack size ..................... %d",
- tracker_config_get_thread_stack_size (tracker->config));
- tracker_log (" Throttle level ........................ %d",
- tracker_config_get_throttle (tracker->config));
+ g_message (" Minimum index word length ............ %d",
+ tracker_config_get_min_word_length (tracker->config));
+ g_message (" Maximum index word length ............ %d",
+ tracker_config_get_max_word_length (tracker->config));
+ g_message (" Maximum text to index ................. %d",
+ tracker_config_get_max_text_to_index (tracker->config));
+ g_message (" Maximum words to index ................ %d",
+ tracker_config_get_max_words_to_index (tracker->config));
+ g_message (" Maximum bucket count .................. %d",
+ tracker_config_get_max_bucket_count (tracker->config));
+ g_message (" Minimum bucket count .................. %d",
+ tracker_config_get_min_bucket_count (tracker->config));
+ g_message (" Divisions ............................. %d",
+ tracker_config_get_divisions (tracker->config));
+ g_message (" Padding ............................... %d",
+ tracker_config_get_padding (tracker->config));
+ g_message (" Optimization sweep count .............. %d",
+ tracker_config_get_optimization_sweep_count (tracker->config));
+ g_message (" Thread stack size ..................... %d",
+ tracker_config_get_thread_stack_size (tracker->config));
+ g_message (" Throttle level ........................ %d",
+ tracker_config_get_throttle (tracker->config));
log_option_list (watch_directory_roots, "Watching directory roots");
log_option_list (crawl_directory_roots, "Crawling directory roots");
@@ -387,7 +382,7 @@
/* Reset stats for embedded services if they are being reindexed */
if (!need_data) {
- tracker_log ("*** DELETING STATS *** ");
+ g_message ("*** DELETING STATS *** ");
tracker_db_exec_no_reply (db_con->db,
"update ServiceTypes set TypeCount = 0 where Embedded = 1");
}
@@ -443,9 +438,9 @@
default:
if (g_strsignal (signo)) {
- tracker_log ("Received signal:%d->'%s'",
- signo,
- g_strsignal (signo));
+ g_message ("Received signal:%d->'%s'",
+ signo,
+ g_strsignal (signo));
}
break;
}
@@ -582,7 +577,7 @@
if (!tracker->readonly &&
!need_index &&
tracker_db_get_option_int (db_con, "IntegrityCheck") == 1) {
- tracker_log ("Performing integrity check as the daemon was not shutdown cleanly");
+ g_message ("Performing integrity check as the daemon was not shutdown cleanly");
/* FIXME: Finish */
}
@@ -617,9 +612,9 @@
TRACKER_INDEXER_FILE_INDEX_DB_FILENAME,
NULL);
- tracker_log ("Overwriting '%s' with '%s'",
- file_index_name,
- final_index_name);
+ g_message ("Overwriting '%s' with '%s'",
+ file_index_name,
+ final_index_name);
rename (final_index_name, file_index_name);
g_free (file_index_name);
}
@@ -638,9 +633,9 @@
TRACKER_INDEXER_EMAIL_INDEX_DB_FILENAME,
NULL);
- tracker_log ("Overwriting '%s' with '%s'",
- file_index_name,
- final_index_name);
+ g_message ("Overwriting '%s' with '%s'",
+ file_index_name,
+ final_index_name);
rename (final_index_name, file_index_name);
g_free (file_index_name);
}
@@ -671,7 +666,7 @@
static gboolean
shutdown_timeout_cb (gpointer user_data)
{
- tracker_error ("Could not exit in a timely fashion - terminating...");
+ g_critical ("Could not exit in a timely fashion - terminating...");
exit (EXIT_FAILURE);
return FALSE;
@@ -680,7 +675,7 @@
static void
shutdown_threads (GThread *thread_to_join)
{
- tracker_log ("Shutting down threads");
+ g_message ("Shutting down threads");
/* Wait for files thread to sleep */
while (!g_mutex_trylock (tracker->files_signal_mutex)) {
@@ -717,17 +712,17 @@
/* We wait now for the thread to exit and join, then clean up
* the mutexts and conds.
*/
- tracker_log ("Waiting for thread:%p to finish", thread_to_join);
+ g_message ("Waiting for thread to finish");
g_thread_join (thread_to_join);
/* Clean up */
#if 0
- tracker_log ("Waiting for file check/signal mutexes to unlock before cleaning up...");
+ g_message ("Waiting for file check/signal mutexes to unlock before cleaning up...");
g_mutex_free (tracker->files_check_mutex);
g_mutex_free (tracker->files_signal_mutex);
g_cond_free (tracker->files_signal_cond);
- tracker_log ("Waiting for metadata check/signal mutexes to unlock before cleaning up...");
+ g_message ("Waiting for metadata check/signal mutexes to unlock before cleaning up...");
g_mutex_free (tracker->metadata_check_mutex);
g_mutex_free (tracker->metadata_signal_mutex);
g_cond_free (tracker->metadata_signal_cond);
@@ -741,7 +736,7 @@
gint lfp;
gboolean multiple = FALSE;
- tracker_log ("Checking instances running");
+ g_message ("Checking instances running");
lock_file = get_lock_file ();
@@ -944,10 +939,11 @@
}
/* Initialise other subsystems */
- tracker_log_init (log_filename,
- tracker_config_get_verbosity (tracker->config),
- fatal_errors);
-
+ tracker_log_init (G_LOG_DOMAIN,
+ log_filename,
+ tracker_config_get_verbosity (tracker->config));
+ g_message ("Starting log");
+
if (!tracker_dbus_preinit (tracker, &connection, &proxy))
return EXIT_FAILURE;
@@ -985,7 +981,7 @@
* call so we have to check value of errno too. Stupid...
*/
if (nice (19) == -1 && errno) {
- tracker_log ("Couldn't set nice() value");
+ g_message ("Couldn't set nice() value");
}
#ifdef IOPRIO_SUPPORT
@@ -993,7 +989,7 @@
#endif
if (!tracker_db_load_prepared_queries ()) {
- tracker_error ("Could not initialize database engine!");
+ g_critical ("Could not initialize database engine!");
return EXIT_FAILURE;
}
@@ -1018,7 +1014,7 @@
if (!tracker->readonly) {
if (!tracker_start_watching ()) {
tracker->is_running = FALSE;
- tracker_error ("File monitoring failed to start");
+ g_critical ("File monitoring failed to start");
}
else if (tracker_config_get_enable_indexing (tracker->config)) {
thread = g_thread_create_full ((GThreadFunc) tracker_process_files,
@@ -1029,7 +1025,7 @@
G_THREAD_PRIORITY_NORMAL,
NULL);
} else {
- tracker_log ("Indexing disabled, waiting for DBus requests...");
+ g_message ("Indexing disabled, waiting for DBus requests...");
}
}
Modified: branches/indexer-split/src/trackerd/tracker-metadata.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-metadata.c (original)
+++ branches/indexer-split/src/trackerd/tracker-metadata.c Tue May 20 08:15:30 2008
@@ -94,13 +94,14 @@
g_free (text_filter_file);
if (!argv[1]) {
- tracker_error ("ERROR: uri could not be converted to locale format");
+ g_critical ("uri could not be converted to locale format");
g_free (argv[0]);
g_free (argv[2]);
return NULL;
}
- tracker_info ("extracting text for %s using filter %s", argv[1], argv[0]);
+ g_message ("Extracting text for:'%s' using filter:'%s'",
+ argv[1], argv[0]);
if (tracker_spawn (argv, 30, NULL, NULL)) {
@@ -152,7 +153,7 @@
} else if (exit_status != EXIT_SUCCESS) {
thumbnail = NULL;
} else {
- tracker_log ("got thumbnail %s", thumbnail);
+ g_message ("got thumbnail %s", thumbnail);
}
g_free (argv[0]);
@@ -194,7 +195,7 @@
argv[3] = NULL;
if (!argv[1] || !argv[2]) {
- tracker_error ("ERROR: uri or mime could not be converted to locale format");
+ g_critical ("uri or mime could not be converted to locale format");
g_free (argv[0]);
g_free (argv[1]);
Modified: branches/indexer-split/src/trackerd/tracker-process-files.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-process-files.c (original)
+++ branches/indexer-split/src/trackerd/tracker-process-files.c Tue May 20 08:15:30 2008
@@ -112,7 +112,7 @@
dir_in_locale = g_filename_from_utf8 (dir, -1, NULL, NULL, NULL);
if (!dir_in_locale) {
- tracker_error ("ERROR: dir could not be converted to utf8 format");
+ g_warning ("Could not convert directory:'%s' o UTF-8", dir);
g_free (dir_in_locale);
return NULL;
}
@@ -237,7 +237,8 @@
if (!g_utf8_validate (l->data, -1, NULL)) {
dir = g_filename_to_utf8 (l->data, -1, NULL,NULL,NULL);
if (!dir) {
- tracker_error ("Directory to watch was not valid UTF-8 and couldn't be converted either");
+ g_warning ("Could not convert directory:'%s' to UTF-8",
+ (gchar*) l->data);
continue;
}
} else {
@@ -269,7 +270,7 @@
if (watches < tracker->watch_limit) {
if (!tracker_add_watch_dir (dir, db_con)) {
- tracker_debug ("Watch failed for %s", dir);
+ g_warning ("Watch failed for:'%s'", dir);
}
}
}
@@ -386,7 +387,7 @@
files = process_get_files (tracker, uri, FALSE, TRUE, NULL);
- tracker_debug ("Scanning %s for %d files", uri, g_slist_length (files));
+ g_message ("Scanning:'%s' for %d files", uri, g_slist_length (files));
info = g_slice_new (ForEachDBCon);
info->tracker = tracker;
@@ -410,7 +411,7 @@
g_slice_free (ForEachDBCon, info);
- tracker_debug ("Finished scanning");
+ g_message ("Finished scanning");
}
static void
@@ -499,7 +500,7 @@
service_info = tracker_ontology_get_service_type_for_dir (info->uri);
if (!service_info) {
- tracker_error ("ERROR: cannot find service for path %s", info->uri);
+ g_warning ("Can not find service for path:'%s'", info->uri);
return;
}
@@ -507,9 +508,9 @@
if (!def) {
if (service_info) {
- tracker_error ("ERROR: unknown service %s", service_info);
+ g_warning ("Unknown service:'%s'", service_info);
} else {
- tracker_error ("ERROR: unknown service");
+ g_warning ("Unknown service");
}
g_free (service_info);
return;
@@ -563,7 +564,7 @@
tracker_db_delete_file (db_con, info->file_id);
- tracker_log ("Deleting file %s", info->uri);
+ g_message ("Deleting file:'%s'", info->uri);
}
static void
@@ -587,7 +588,7 @@
tracker_remove_watch_dir (info->uri, TRUE, db_con);
- tracker_log ("Deleting dir %s and subdirs", info->uri);
+ g_message ("Deleting directory:'%s' and subdirs", info->uri);
}
static void
@@ -652,7 +653,7 @@
g_return_if_fail (tracker_file_is_directory (uri));
files = process_get_files (tracker, uri, FALSE, TRUE, NULL);
- tracker_debug ("Checking %s for %d files", uri, g_slist_length (files));
+ g_message ("Checking:'%s' for %d files", uri, g_slist_length (files));
g_slist_foreach (files, (GFunc) process_queue_files_foreach, tracker);
g_slist_foreach (files, (GFunc) g_free, NULL);
@@ -671,7 +672,7 @@
static void
process_index_config (Tracker *tracker, DBConnection *db_con)
{
- tracker_log ("Starting config indexing");
+ g_message ("Starting config indexing");
}
static void
@@ -679,7 +680,7 @@
{
GSList *list;
- tracker_log ("Starting application indexing");
+ g_message ("Starting application indexing");
tracker_db_start_index_transaction (db_con);
tracker_db_interface_start_transaction (db_con->cache->db);
@@ -787,7 +788,7 @@
GSList *index_exclude;
ForEachDBCon *info;
- tracker_log ("Starting file indexing...");
+ g_message ("Starting file indexing...");
object = tracker_dbus_get_object (TRACKER_TYPE_DBUS_DAEMON);
@@ -816,12 +817,12 @@
if (index_exclude) {
GSList *l;
- tracker_log ("Deleting entities where indexing is disabled or are not watched:");
+ g_message ("Deleting entities where indexing is disabled or are not watched:");
for (l = index_exclude; l; l = l->next) {
guint32 id;
- tracker_log (" %s", l->data);
+ g_message (" %s", (gchar*) l->data);
id = tracker_db_get_file_id (db_con, l->data);
@@ -834,7 +835,7 @@
}
if (!index_include) {
- tracker_log ("No directory roots to index!");
+ g_message ("No directory roots to index!");
return;
}
@@ -937,7 +938,7 @@
GSList *crawl_directory_roots;
ForEachDBCon *info;
- tracker_log ("Starting directory crawling...");
+ g_message ("Starting directory crawling...");
crawl_directories = NULL;
crawl_directory_roots =
@@ -1002,8 +1003,7 @@
}
if (has_logs) {
-
- tracker_log ("Starting chat log indexing...");
+ g_message ("Starting chat log indexing...");
tracker_db_interface_start_transaction (db_con->cache->db);
process_directory_list (tracker, list, TRUE, db_con);
tracker_db_interface_end_transaction (db_con->cache->db);
@@ -1025,7 +1025,7 @@
if (tracker_file_is_valid (firefox_dir)) {
list = g_slist_prepend( NULL, firefox_dir);
- tracker_log ("Starting Firefox web history indexing...");
+ g_message ("Starting Firefox web history indexing...");
tracker_ontology_add_dir_to_service_type ("WebHistory", firefox_dir);
tracker_db_interface_start_transaction (db_con->cache->db);
@@ -1075,7 +1075,7 @@
const gchar *name;
tracker_email_add_service_directories (db_con->emails);
- tracker_log ("Starting email indexing...");
+ g_message ("Starting email indexing...");
tracker_db_interface_start_transaction (db_con->cache->db);
@@ -1207,12 +1207,12 @@
g_timer_destroy (index_duration);
index_duration = NULL;
- tracker_log ("Indexing finished in %d seconds", time_taken);
+ g_message ("Indexing finished in %d seconds", time_taken);
g_signal_emit_by_name (object, "index-finished", time_taken);
tracker_db_set_option_int (db_con, "InitialIndex", 0);
- tracker_log ("Updating database stats, please wait...");
+ g_message ("Updating database stats, please wait...");
tracker_db_interface_start_transaction (db_con->db);
tracker_db_exec_no_reply (db_con->db, "ANALYZE");
@@ -1222,7 +1222,7 @@
tracker_db_exec_no_reply (db_con->emails->db, "ANALYZE");
tracker_db_interface_end_transaction (db_con->emails->db);
- tracker_log ("Finished optimizing, waiting for new events...");
+ g_message ("Finished optimizing, waiting for new events...");
}
/* We have no stuff to process so sleep until awoken by a new
@@ -1284,7 +1284,7 @@
case TRACKER_DB_ACTION_FILE_MOVED_FROM:
need_index = FALSE;
- tracker_log ("Starting moving file %s to %s", info->uri, info->moved_to_uri);
+ g_message ("Starting moving file:'%s' to:'%s'", info->uri, info->moved_to_uri);
tracker_db_move_file (db_con, info->uri, info->moved_to_uri);
break;
@@ -1320,7 +1320,7 @@
case TRACKER_DB_ACTION_DIRECTORY_CREATED:
need_index = TRUE;
- tracker_debug ("Processing created directory %s", info->uri);
+ g_message ("Processing created directory %s", info->uri);
/* Schedule a rescan for all files in folder
* to avoid race conditions.
@@ -1338,8 +1338,8 @@
g_slist_free (list);
} else {
- tracker_debug ("Blocked scan of directory %s as its in the no watch list",
- info->uri);
+ g_message ("Blocked scan of directory:'%s' as its in the no watch list",
+ info->uri);
}
break;
@@ -1382,10 +1382,10 @@
info->is_new = TRUE;
}
- tracker_debug ("Processing %s with action %s and counter %d ",
- info->uri,
- tracker_db_action_to_string (info->action),
- info->counter);
+ g_message ("Processing:'%s' with action:'%s' and counter:%d ",
+ info->uri,
+ tracker_db_action_to_string (info->action),
+ info->counter);
/* Preprocess ambiguous actions when we need to work
* out if its a file or a directory that the action
@@ -1461,7 +1461,7 @@
{
GSList *list;
- tracker_log ("** TRAWLING THROUGH NEW MOUNT POINT '%s'", mount_point);
+ g_message ("** TRAWLING THROUGH NEW MOUNT POINT:'%s'", mount_point);
list = g_slist_prepend (NULL, (gchar*) mount_point);
process_directory_list (tracker, list, TRUE, db_con);
@@ -1474,7 +1474,7 @@
Tracker *tracker,
DBConnection *db_con)
{
- tracker_log ("** CLEANING UP OLD MOUNT POINT '%s'", mount_point);
+ g_message ("** CLEANING UP OLD MOUNT POINT:'%s'", mount_point);
process_index_delete_directory_check (tracker, mount_point, db_con);
}
@@ -1568,7 +1568,7 @@
/* Sleep for N secs before watching/indexing any of the major services */
initial_sleep = tracker_config_get_initial_sleep (tracker->config);
- tracker_log ("Sleeping for %d secs before starting...", initial_sleep);
+ g_message ("Sleeping for:%d secs before starting...", initial_sleep);
while (initial_sleep > 0) {
g_usleep (G_USEC_PER_SEC);
@@ -1581,7 +1581,7 @@
}
}
- tracker_log ("Proceeding with indexing...");
+ g_message ("Proceeding with indexing...");
tracker_index_stage_set (TRACKER_INDEX_STAGE_CONFIG);
@@ -1591,7 +1591,7 @@
first_run = TRUE;
moved_from_list = NULL;
- tracker_log ("Starting indexing...");
+ g_message ("Starting indexing...");
if (index_duration) {
g_timer_destroy (index_duration);
@@ -1718,7 +1718,9 @@
if (need_index) {
if (tracker_db_regulate_transactions (db_con, 250)) {
if (tracker_config_get_verbosity (tracker->config) == 1) {
- tracker_log ("indexing #%d - %s", tracker->index_count, info->uri);
+ g_message ("Indexing #%d, '%s'",
+ tracker->index_count,
+ info->uri);
}
/* Signal progress */
@@ -1753,7 +1755,7 @@
g_mutex_unlock (tracker->files_signal_mutex);
- tracker_log ("Process thread:%p now finishing", g_thread_self ());
+ g_message ("Process thread now finishing");
g_thread_exit (NULL);
return NULL;
@@ -1798,12 +1800,12 @@
/* Check if equal or a prefix with an appended '/' */
if (strcmp (uri, l->data) == 0) {
- tracker_log ("Blocking watch of %s (already being watched)", uri);
+ g_message ("Blocking watch of:'%s' (already being watched)", uri);
return FALSE;
}
if (process_is_in_path (uri, l->data)) {
- tracker_log ("Blocking watch of %s (already a watch in parent path)", uri);
+ g_message ("Blocking watch of:'%s' (already a watch in parent path)", uri);
return FALSE;
}
}
@@ -1863,9 +1865,9 @@
g_slist_free (crawl_directory_roots);
- tracker_log ("Indexer %s %s",
- should_be_crawled ? "crawling" : "blocking",
- uri);
+ g_message ("Indexer %s:'%s'",
+ should_be_crawled ? "crawling" : "blocking",
+ uri);
return should_be_crawled;
}
@@ -2013,7 +2015,7 @@
g_return_val_if_fail (info->uri != NULL, FALSE);
if (!g_utf8_validate (info->uri, -1, NULL)) {
- tracker_log ("Expected UTF-8 validation of TrackerDBFileInfo URI");
+ g_warning ("Expected UTF-8 validation of TrackerDBFileInfo URI");
return FALSE;
}
Modified: branches/indexer-split/src/trackerd/tracker-rdf-query.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-rdf-query.c (original)
+++ branches/indexer-split/src/trackerd/tracker-rdf-query.c Tue May 20 08:15:30 2008
@@ -695,9 +695,9 @@
int cvalue;
bvalue = tracker_date_format (avalue);
- tracker_debug (bvalue);
+ g_debug (bvalue);
cvalue = tracker_string_to_date (bvalue);
- tracker_debug ("%d", cvalue);
+ g_debug ("%d", cvalue);
value = tracker_int_to_string (cvalue);
g_free (bvalue);
} else {
@@ -1016,7 +1016,7 @@
GError *error,
gpointer user_data)
{
- tracker_error ("ERROR: in rdf query parse: %s", error->message);
+ g_critical ("in rdf query parse: %s", error->message);
}
@@ -1084,7 +1084,7 @@
field_data = add_metadata_field (&data, fields[i], TRUE, FALSE);
if (!field_data) {
- tracker_error ("ERROR: RDF Query failed: field %s not found", fields[i]);
+ g_critical ("RDF Query failed: field %s not found", fields[i]);
g_slist_foreach (data.fields, (GFunc) tracker_free_metadata_field, NULL);
g_slist_free (data.fields);
g_string_free (data.sql_select, TRUE);
@@ -1100,7 +1100,7 @@
data.sql_from = g_string_new ("");
- tracker_debug ("search term is %s", search_text);
+ g_debug ("search term is %s", search_text);
if (!tracker_is_empty_string (search_text)) {
Modified: branches/indexer-split/src/trackerd/tracker-utils.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-utils.c (original)
+++ branches/indexer-split/src/trackerd/tracker-utils.c Tue May 20 08:15:30 2008
@@ -133,8 +133,8 @@
return;
}
- tracker_log ("File changes to:'%s' is causing tracker to pause...",
- uri);
+ g_message ("File changes to:'%s' is causing tracker to pause...",
+ uri);
tracker->grace_period++;
}
@@ -155,13 +155,13 @@
static gboolean reported = 0;
if (! reported) {
reported = 1;
- tracker_error ("Could not statvfs %s", tracker->data_dir);
+ g_critical ("Could not statvfs %s", tracker->data_dir);
}
return FALSE;
}
if (((long long) st.f_bavail * 100 / st.f_blocks) <= low_disk_space_limit) {
- tracker_error ("Disk space is low!");
+ g_critical ("Disk space is low!");
return TRUE;
}
Modified: branches/indexer-split/src/trackerd/tracker-xesam-query.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-xesam-query.c (original)
+++ branches/indexer-split/src/trackerd/tracker-xesam-query.c Tue May 20 08:15:30 2008
@@ -832,9 +832,9 @@
int cvalue;
bvalue = tracker_date_format (avalue);
- tracker_debug (bvalue);
+ g_debug (bvalue);
cvalue = tracker_string_to_date (bvalue);
- tracker_debug ("%d", cvalue);
+ g_debug ("%d", cvalue);
value = tracker_int_to_string (cvalue);
g_free (bvalue);
} else if (state == STATE_END_BOOLEAN) { /* FIXME We do a state check here, because TRACKER_FIELD_TYPE_BOOLEAN is not in db */
@@ -1166,7 +1166,7 @@
GError *error,
gpointer user_data)
{
- tracker_error ("ERROR: in rdf query parse: %s", error->message);
+ g_critical ("Failed to parse RDF query, %s", error->message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]