> On 13 Jun 2017, at 10:42, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> wrote: > > Hi > > ----- Original Message ----- >> On Tue, Jun 13, 2017 at 09:45:20AM +0200, Christophe de Dinechin wrote: >>>> 5. The spice_log_init deals with hard-coded variables in a >>>> hard-coded way. I purposely had a function taking a string, and >>>> called either with env vars or command line options. I was thinking >>>> long-term about other inputs, notably the client being able to send >>>> debug options to the server. >>>> >>>> >>>> Whoo, client sending debug options to the server? That is quite strange. >>> >>> What I would like is to be able to enable collection of debug >>> information (ideally on a per-session basis) without having to restart >>> the server. Is that strange? > > "enabling a collection of debug information" at run-time could be done through a server API, exposed as a QMP command (or other interface for other servers). This is another interface that we could expose with the approach I suggest, yes. > I don't think the client & SPICE protocol should have this admin/debug feature. Just because it’s a good idea to add it also as a QMP command does not mean it’s a bad idea to make it convenient to get server debug for a given session. It’s really different use cases. I would use QMP if I’m really debugging the server. I would use a per-session debug if I’m interested in something related to the interaction between server and client. In that case, I would ideally use something like mm time in the logs instead of standard time, to make sure I can correlate server and client logs. > >> Let's first see if we manage to add useful debug logs to both the client >> and the server, then we can look into adding this :) I agree. I was explaining why I had made a choice to have a dedicated function taking a string argument with the options, rather than directly reading the environment variable. >> In the mean time, this will probably be possible to do through a gdb script. One that I can run client side? BTW, having a function also means I could do something like: - attach gdb to the server - Run ‘p spice_set_trace(“ssl:marshal_read”)’ and easily activate specific traces on an already-running server. Christophe _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel