gvfs freeze break request - enabling debug output



Late in the cycle I removed all the debug spew from the gvfs backends by
default. You now have to enable it by passing --debug when starting the
backend.

However, this is somewhat tricky when you're mounting the backend from
some app, as then the backend is spawned by gvfsd. We've generally
debugged such things before by running gvfsd -r in a shell to replace
the running gvfsd and see all the output from its children. But gvfsd
doesn't spawn the children with --debug, so we now get no debug output.

I'd like to commit this:

--- a/daemon/daemon-main.c
+++ b/daemon/daemon-main.c
@@ -142,6 +142,10 @@ daemon_parse_args (int argc, char *argv[], const
char *default_type)
       argc--;
       argv++;
     }
+  else if (g_getenv ("GVFS_DEBUG"))
+    {
+      print_debug = TRUE;
+    }
   
   mount_spec = NULL;
   if (argc > 1 && strcmp (argv[1], "--spawner") == 0)

Which makes it easier to debug backends. It would be nice to have in the
2.26 release so we can ask people for debug logs when debugging stuff.

Permission to commit?



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