[tracker/tracker-0.6] Fixes NB#126772 spam in syslog



commit 5d19a8bf278b3c40fd2e3af134e88f480b52d11e
Author: Ivan Frade <ivan frade nokia com>
Date:   Tue Aug 11 12:59:34 2009 +0300

    Fixes NB#126772 spam in syslog
    
    Move some g_message to g_debug to reduce the logging in syslog.

 src/libtracker-common/tracker-file-utils.c        |   11 +++++------
 src/libtracker-common/tracker-os-dependant-unix.c |    2 +-
 src/tracker-extract/tracker-extract.c             |   14 ++++++++------
 3 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/src/libtracker-common/tracker-file-utils.c b/src/libtracker-common/tracker-file-utils.c
index 8d48b72..8c94739 100644
--- a/src/libtracker-common/tracker-file-utils.c
+++ b/src/libtracker-common/tracker-file-utils.c
@@ -761,16 +761,16 @@ path_has_write_access_or_was_created (const gchar *path)
 	writable = path_has_write_access (path, &exists);
 	if (exists) {
 		if (writable) {
-			g_message ("  Path is OK");
+			g_debug ("  Path is OK");
 			return TRUE;
 		}
 
 		g_message ("  Path can not be written to");
 	} else {
-		g_message ("  Path does not exist, attempting to create...");
+		g_debug ("  Path does not exist, attempting to create...");
 
 		if (g_mkdir_with_parents (path, 0700) == 0) {
-			g_message ("  Path was created");
+			g_debug ("  Path was created");
 			return TRUE;
 		}
 
@@ -787,7 +787,7 @@ tracker_env_check_xdg_dirs (void)
 	gchar	    *new_dir;
 	gboolean     success;
 
-	g_message ("Checking XDG_DATA_HOME is writable and exists");
+	g_debug ("Checking XDG_DATA_HOME is writable and exists");
 
 	/* NOTE: We don't use g_get_user_data_dir() here because as
 	 * soon as we do, it sets the result and doesn't re-fetch the
@@ -796,9 +796,8 @@ tracker_env_check_xdg_dirs (void)
 	user_data_dir = g_getenv ("XDG_DATA_HOME");
 
 	/* Check the default XDG_DATA_HOME location */
-	g_message ("  XDG_DATA_HOME is '%s'", user_data_dir);
-
 	if (user_data_dir && path_has_write_access_or_was_created (user_data_dir)) {
+		g_message ("  XDG_DATA_HOME is '%s'", user_data_dir);
 		return TRUE;
 	}
 
diff --git a/src/libtracker-common/tracker-os-dependant-unix.c b/src/libtracker-common/tracker-os-dependant-unix.c
index aa68e49..e49fa41 100644
--- a/src/libtracker-common/tracker-os-dependant-unix.c
+++ b/src/libtracker-common/tracker-os-dependant-unix.c
@@ -329,7 +329,7 @@ tracker_memory_set_oom_adj (void)
 	}
 
 	if (success) {
-		g_message ("OOM score has been set to %s", str);
+		g_debug ("OOM score has been set to %s", str);
 	} else {
 		g_critical ("Could not adjust OOM score");
 	}
diff --git a/src/tracker-extract/tracker-extract.c b/src/tracker-extract/tracker-extract.c
index 4191ef8..ee14a4d 100644
--- a/src/tracker-extract/tracker-extract.c
+++ b/src/tracker-extract/tracker-extract.c
@@ -112,6 +112,8 @@ tracker_extract_new (void)
 					  TRUE,
 					  sizeof (ModuleData));
 
+	g_message ("Loading extractor modules");
+
 	while ((name = g_dir_read_name (dir)) != NULL) {
 		TrackerExtractDataFunc func;
 		GModule *module;
@@ -141,17 +143,17 @@ tracker_extract_new (void)
 			mdata.module = module;
 			mdata.edata = (func) ();
 
-			g_message ("Adding extractor:'%s' with:",
-				   g_module_name ((GModule*) mdata.module));
+			g_debug ("Adding extractor:'%s' with:",
+				 g_module_name ((GModule*) mdata.module));
 
 			for (; mdata.edata->mime; mdata.edata++) {
 				if (G_UNLIKELY (strchr (mdata.edata->mime, '*') != NULL)) {
-					g_message ("  Generic  match for mime:'%s'",
-						   mdata.edata->mime);
+					g_debug ("  Generic  match for mime:'%s'",
+						 mdata.edata->mime);
 					g_array_append_val (generic_extractors, mdata);
 				} else {
-					g_message ("  Specific match for mime:'%s'",
-						   mdata.edata->mime);
+					g_debug ("  Specific match for mime:'%s'",
+						 mdata.edata->mime);
 					g_array_append_val (specific_extractors, mdata);
 				}
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]