[Spice-devel] [spice-server v3 6/8] Use spice_debug rather than spice_info in library code
Christophe Fergeau
cfergeau at redhat.com
Wed Feb 8 15:04:04 UTC 2017
On Wed, Feb 08, 2017 at 02:38:04PM +0100, Pavel Grunt wrote:
> On Wed, 2017-02-08 at 11:42 +0100, Christophe Fergeau wrote:
> > On Wed, Feb 08, 2017 at 10:57:42AM +0100, Pavel Grunt wrote:
> > > On Mon, 2017-02-06 at 18:15 +0100, Christophe Fergeau wrote:
> > > > Using spice_info() gets in the way of tests
> > >
> > > I would say that is the problem of the test, it is possible to
> > > check
> > > the INFO level as well. imo spice_info messages are useful
> >
> > The test could ignore all info messages indeed. However (on f25), I
> > don't see a lot of difference between DEBUG and INFO levels, neither
> > are
> > shown unless G_MESSAGES_DEBUG=all is specified. Are you saying
> > having
> > the distinction between spice_info and spice_debug in this debug log
> > is
> > useful? To me, usage of one or the other seemed fairly random.
> >
> You are right it doesn't work. imo the info messages should be always
> printed - but apparently we are using spice_printerr for that :/
>
> There is an inconsistency, for instance
> spice_printerr("add main channel client");
> spice_info("create display channel");
>
> IMHO We should get rid of spice_printerr where is used for info
> messages and make spice_info work properly
For me, spice_info currently works reasonably well, ie I don't think
spice-server should write anything to stdout/stderr by default. I agree
that we should switch some spice_printerr to spice_info/spice_debug when
the goal is to display some info.
If you mean that spice_info() should print to stdout by default, why
not, but only after this patch which changes most spice_info() to
spice_debug() ;)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170208/f34300f8/attachment.sig>
More information about the Spice-devel
mailing list