[Spice-devel] log file for spice-gtk

Alon Levy alevy at redhat.com
Thu Mar 15 05:00:02 PDT 2012


On Thu, Mar 15, 2012 at 12:25:19PM +0100, Marc-André Lureau wrote:
> On Thu, Mar 15, 2012 at 11:39 AM, Alon Levy <alevy at redhat.com> wrote:
> > OK, so I think there is place to make remote-viewer produce a log file
> > by default.
> 
> The caller of virt-viewer/spice-gtk can redirect logging to files. By
> experience, I'd say this is the right solution, as it avoid filling
> disk or getting complicated logging (it's not difficult to get several
> megabytes in several files...)
> 
> > 1. For any hard to reproduce error there will be a log file by default.
> 
> What do you mean by default? There are very good reasons why logging
> files aren't used, not even by default. There are tons of things

Can you give examples? libvirt produces logging files for qemu and
itself, for example.

> missing anyway, typically how/where/who compiled the project, the
> gazillions of depedencies information and their own logging etc..

We support RHEL, we know what depoendencies went into producing the
executable (same for any other distro really).

> spice-gtk/remote-viewer probably account for 0.01% of the code that is
> actually run.. If we want Spice domain logging, then we should dump
> the traffic, at least we would be able to reproduce something
> eventually..

That's a straw man. I'm not suggesting to capture the traffic, I
concede that there is such a thing as too much logging. But a default
suitable level of INFO (that's why we have the DEBUG level in the first
place) would work, and is what spicec has been doing.

> 
> And in the end, 99% of the bugs are solved with: backtrace +
> reproducer. Not logging.

I agree we prefer a reproducer + backtrace. But it isn't an argument for
dumping the log file. Also, I'm not sure about your 99% statistic.

> 
> > 2. Users who were used to spicec.log will have a remote-viewer.log
> 
> Why? Who is used to spicec.log? there isn't such thing anymore, and it
> hasn't been "specified" what is spicec.log.

spicec produces a file at $HOME/.spicec/spicec.log, it contains some
information that can be used to understand what spicec was going.

> 
> > I haven't noticed any easy way to set a fd different then stderr for
> > debugging output though, maybe someone can help?
> 
> By stderr redirection, if you really want to (for example, when the
> reproducer is only on one machine)

We could have spice-xpi redirect the output to a file, akin to libvirt
redirecting qemu output.

> 
> -- 
> Marc-André Lureau
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list