[tracker] tracker-extract: Make `tracker-extract --file` silent when --verbosity=0



commit 0e4b2473f5128822e041cf62af8ae49169a7e8bc
Author: Sam Thursfield <sam afuera me uk>
Date:   Thu Apr 7 16:10:20 2016 +0100

    tracker-extract: Make `tracker-extract --file` silent when --verbosity=0

 src/libtracker-common/tracker-log.c |    6 ++++++
 src/tracker-extract/tracker-main.c  |   16 ++++++++--------
 2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-common/tracker-log.c b/src/libtracker-common/tracker-log.c
index d300ee7..83dd18c 100644
--- a/src/libtracker-common/tracker-log.c
+++ b/src/libtracker-common/tracker-log.c
@@ -267,6 +267,12 @@ tracker_log_init (gint    this_verbosity,
                                                    hide_levels,
                                                    hide_log_handler,
                                                    NULL);
+
+               /* Do the same for 'libmediaart' log output */
+               log_handler_id = g_log_set_handler ("libmediaart",
+                                                   hide_levels,
+                                                   hide_log_handler,
+                                                   NULL);
        }
 
        /* Set log handler function for the rest */
diff --git a/src/tracker-extract/tracker-main.c b/src/tracker-extract/tracker-main.c
index a02cb0e..2c8ecd8 100644
--- a/src/tracker-extract/tracker-main.c
+++ b/src/tracker-extract/tracker-main.c
@@ -328,14 +328,6 @@ main (int argc, char *argv[])
 
        config = tracker_config_new ();
 
-       /* Set conditions when we use stand alone settings */
-       if (filename) {
-               return run_standalone (config);
-       }
-
-       /* Initialize subsystems */
-       initialize_directories ();
-
        /* Extractor command line arguments */
        if (verbosity > -1) {
                tracker_config_set_verbosity (config, verbosity);
@@ -349,6 +341,14 @@ main (int argc, char *argv[])
 
        sanity_check_option_values (config);
 
+       /* Set conditions when we use stand alone settings */
+       if (filename) {
+               return run_standalone (config);
+       }
+
+       /* Initialize subsystems */
+       initialize_directories ();
+
        /* This makes sure we don't steal all the system's resources */
        initialize_priority_and_scheduling (tracker_config_get_sched_idle (config),
                                            tracker_db_manager_get_first_index_done () == FALSE);


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