Commit 92c30f1d authored by Philip Withnall's avatar Philip Withnall Committed by Philip Withnall

gs-plugin-job: Clarify plugin job debug output

Move the more important information to the start of the string.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent 68519b25
...@@ -64,6 +64,10 @@ gs_plugin_job_to_string (GsPluginJob *self) ...@@ -64,6 +64,10 @@ gs_plugin_job_to_string (GsPluginJob *self)
gint64 time_now = g_get_monotonic_time (); gint64 time_now = g_get_monotonic_time ();
g_string_append_printf (str, "running %s", g_string_append_printf (str, "running %s",
gs_plugin_action_to_string (self->action)); gs_plugin_action_to_string (self->action));
if (self->plugin != NULL) {
g_string_append_printf (str, " on plugin=%s",
gs_plugin_get_name (self->plugin));
}
if (self->filter_flags > 0) { if (self->filter_flags > 0) {
g_autofree gchar *tmp = gs_plugin_refine_flags_to_string (self->filter_flags); g_autofree gchar *tmp = gs_plugin_refine_flags_to_string (self->filter_flags);
g_string_append_printf (str, " with filter-flags=%s", tmp); g_string_append_printf (str, " with filter-flags=%s", tmp);
...@@ -111,10 +115,6 @@ gs_plugin_job_to_string (GsPluginJob *self) ...@@ -111,10 +115,6 @@ gs_plugin_job_to_string (GsPluginJob *self)
g_autofree gchar *path = g_file_get_path (self->file); g_autofree gchar *path = g_file_get_path (self->file);
g_string_append_printf (str, " with file=%s", path); g_string_append_printf (str, " with file=%s", path);
} }
if (self->plugin != NULL) {
g_string_append_printf (str, " on plugin=%s",
gs_plugin_get_name (self->plugin));
}
if (self->list != NULL && gs_app_list_length (self->list) > 0) { if (self->list != NULL && gs_app_list_length (self->list) > 0) {
g_autofree const gchar **unique_ids = NULL; g_autofree const gchar **unique_ids = NULL;
g_autofree gchar *unique_ids_str = NULL; g_autofree gchar *unique_ids_str = NULL;
...@@ -127,7 +127,7 @@ gs_plugin_job_to_string (GsPluginJob *self) ...@@ -127,7 +127,7 @@ gs_plugin_job_to_string (GsPluginJob *self)
g_string_append_printf (str, " on apps %s", unique_ids_str); g_string_append_printf (str, " on apps %s", unique_ids_str);
} }
if (time_now - self->time_created > 1000) { if (time_now - self->time_created > 1000) {
g_string_append_printf (str, " took %" G_GINT64_FORMAT "ms", g_string_append_printf (str, ", elapsed time since creation %" G_GINT64_FORMAT "ms",
(time_now - self->time_created) / 1000); (time_now - self->time_created) / 1000);
} }
return g_string_free (str, FALSE); return g_string_free (str, FALSE);
......
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