Commit ef6261a0 authored by Sam Thursfield's avatar Sam Thursfield

tracker-extract: Use normal logging when in standalone mode

We were installing a different log handler which ignored our verbosity
settings. Until recently this was harmless, but due to rearranging some
code it started to print a log message from Gio that triggers when GFile
is used for the first time:

    _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
parent 2148096b
......@@ -198,32 +198,6 @@ initialize_signal_handler (void)
#endif /* G_OS_WIN32 */
}
static void
log_handler (const gchar *domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
{
switch (log_level) {
case G_LOG_LEVEL_WARNING:
case G_LOG_LEVEL_CRITICAL:
case G_LOG_LEVEL_ERROR:
case G_LOG_FLAG_RECURSION:
case G_LOG_FLAG_FATAL:
g_fprintf (stderr, "%s\n", message);
fflush (stderr);
break;
case G_LOG_LEVEL_MESSAGE:
case G_LOG_LEVEL_INFO:
case G_LOG_LEVEL_DEBUG:
case G_LOG_LEVEL_MASK:
default:
g_fprintf (stdout, "%s\n", message);
fflush (stdout);
break;
}
}
static void
sanity_check_option_values (TrackerConfig *config)
{
......@@ -252,14 +226,6 @@ run_standalone (TrackerConfig *config)
GEnumValue *enum_value;
TrackerSerializationFormat output_format;
/* Set log handler for library messages */
g_log_set_default_handler (log_handler, NULL);
/* Set the default verbosity if unset */
if (verbosity == -1) {
verbosity = 3;
}
if (!output_format_name) {
output_format_name = "turtle";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment