[Spice-devel] [PATCH spice-common 0/4] RFC: add structured logging and log category

Christophe de Dinechin dinechin at redhat.com
Tue Jun 13 12:11:03 UTC 2017


> On 13 Jun 2017, at 11:41, Christophe Fergeau <cfergeau at redhat.com> wrote:
> 
> On Tue, Jun 13, 2017 at 11:26:46AM +0200, Christophe de Dinechin wrote:
>>> 
>>>> 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?
> 
> Either client and server are the same, so yes, you can run it client
> side. Either they are not on the same machine, and you'll have to log on
> the server to access the server-side logs anyways. Unless you are
> suggesting sending the server logs to the client, in which case I missed
> it in your suggestion.

I don’t have a frozen design in mind yet. That was one of the options I was considering. There are easily a dozen ways to do it.

A design where we have a dedicated log channel may have lower impact overall on the network, and allow us to include shared timestamps and sorting log entries on display. But it’s more complicated, and may not be useful enough to warrant the effort.

> 
>> BTW, having a function also means I could do something like:
>> 
>> - attach gdb to the server
>> - Run ‘p spice_set_trace(“ssl:marshal_read”)’
> 
> Which is roughly what I suggested when I mentioned a gdb script (though
> you can probably also directly modify the relevant categories rather than
> having a dedicated function)

Yes, but if I want “channel*”, the function will be shorter than manually enabling a dozen channel_xyz categories. The function remains useful.

> 
> Christophe
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list