Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-12 Thread Jonathon Jongsma
This code assumes that there is only a single G_LOG_DOMAIN used within a particular project, but it's not stated explicity (as far as I can tell) On Mon, 2017-06-12 at 12:19 +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > A log category is defined with SPICE_LOG_CATEGORY

Re: [Spice-devel] [PATCH spice-common 1/4] log: replace spice log with glib

2017-06-12 Thread Jonathon Jongsma
On Mon, 2017-06-12 at 12:19 +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Remove all the deprecated spice log macro/environment variables > facility in favour of glib. The following patches will bring some new > log macro with "category" and structured logging. This pat

Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > On Mon, Jun 12, 2017 at 05:41:26PM +0200, Christophe Fergeau wrote: > > On Mon, Jun 12, 2017 at 12:19:53PM +0400, marcandre.lur...@redhat.com > > wrote: > > > From: Marc-André Lureau > > > > > > A log category is defined with SPICE_LOG_CATEGORY(). The macro will

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

2017-06-12 Thread Christophe de Dinechin
> On 12 Jun 2017, at 10:19, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > Hi, > > This is a RFC series to clean-up Spice logging infrastructure to fully > rely on glib g_log & g_log_structured if available, and add logging > categories. It is thus a counter-proposal to Chr

Re: [Spice-devel] [PATCH] Use space and not colon to separate log domains

2017-06-12 Thread Christophe Fergeau
On Thu, Jun 08, 2017 at 06:22:26PM +0200, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > According to https://developer.gnome.org/glib/stable/glib-running.html, > G_MESSAGES_DEBUG is a space-separated list of log domains for which > informational and debug messages should be pri

Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-12 Thread Christophe Fergeau
On Mon, Jun 12, 2017 at 05:41:26PM +0200, Christophe Fergeau wrote: > On Mon, Jun 12, 2017 at 12:19:53PM +0400, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > A log category is defined with SPICE_LOG_CATEGORY(). The macro will > > register a structure with a constructor (a

Re: [Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-12 Thread Christophe Fergeau
On Mon, Jun 12, 2017 at 12:19:53PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > A log category is defined with SPICE_LOG_CATEGORY(). The macro will > register a structure with a constructor (and unregister it on > unloading with a destructor). > > spice_log_init() must

Re: [Spice-devel] [PATCH spice-common 1/4] log: replace spice log with glib

2017-06-12 Thread Christophe Fergeau
On Mon, Jun 12, 2017 at 12:19:51PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Remove all the deprecated spice log macro/environment variables Note that the environment variables were never deprecated in a stable release. Probably would be nice to keep them a bit long

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > Top remark: here is what I expected to see discussed when I shared the code. > Sending a github link isn't really sharing code. It is not our cmmon practice, so we can't easily review/discuss it. > 1. What categories do we want? > 2. How do spread the categori

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > The macro was misused and not doing static check. > Spice have other working static check macros to use. > The macro is used only by spice-common so removing it > does not cause issues to other depending projects. > > Signed-off-by: Frediano Ziglio ack (I won

Re: [Spice-devel] Debugging helper functions

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > The topic of debugging popped up in the thread about logging. There is one > thing I did not find in Spice, which I think would be helpful, namely > debugging helper functions. > > Here is an example of what I have in mind: > https://github.com/c3d/XL-programming

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > Hi > > - Original Message - > > On Fri, Jun 09, 2017 at 12:11:50PM -0400, Marc-André Lureau wrote: > > > I don't get the problem with spice-gtk logging though. > > > > I never remember whether G_MESSAGES_DEBUG=all, SPICE_DEBUG=1 and > > --spice-debug are

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Frediano Ziglio
> > On Mon, Jun 12, 2017 at 07:46:07AM -0400, Marc-André Lureau wrote: > > Hi > > > > - Original Message - > > > On Mon, Jun 12, 2017 at 06:26:58AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > > > I think we should replace SPICE_VERIFY / verify with G_STATIC* > > > > > > > equival

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > On Fri, Jun 09, 2017 at 12:11:50PM -0400, Marc-André Lureau wrote: > > I don't get the problem with spice-gtk logging though. > > I never remember whether G_MESSAGES_DEBUG=all, SPICE_DEBUG=1 and > --spice-debug are the same or not, I think they are not, and if yo

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Christophe Fergeau
On Mon, Jun 12, 2017 at 07:46:07AM -0400, Marc-André Lureau wrote: > Hi > > - Original Message - > > On Mon, Jun 12, 2017 at 06:26:58AM -0400, Frediano Ziglio wrote: > > > > > > > > > > > I think we should replace SPICE_VERIFY / verify with G_STATIC* > > > > > > equivalents. > > > > > >

[Spice-devel] Debugging helper functions

2017-06-12 Thread Christophe de Dinechin
The topic of debugging popped up in the thread about logging. There is one thing I did not find in Spice, which I think would be helpful, namely debugging helper functions. Here is an example of what I have in mind: https://github.com/c3d/XL-programming-language/blob/master/xlr/renderer.cpp#L82

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-12 Thread Christophe Fergeau
On Fri, Jun 09, 2017 at 12:11:50PM -0400, Marc-André Lureau wrote: > I don't get the problem with spice-gtk logging though. I never remember whether G_MESSAGES_DEBUG=all, SPICE_DEBUG=1 and --spice-debug are the same or not, I think they are not, and if you only use eg G_MESSAGES_DEBUG=all, you don

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > On Mon, Jun 12, 2017 at 06:26:58AM -0400, Frediano Ziglio wrote: > > > > > > > > > I think we should replace SPICE_VERIFY / verify with G_STATIC* > > > > > equivalents. > > > > > > > > > > > > > We actually can't for compatibility reason. Some version of GLib

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Christophe Fergeau
On Mon, Jun 12, 2017 at 06:26:58AM -0400, Frediano Ziglio wrote: > > > > > > > I think we should replace SPICE_VERIFY / verify with G_STATIC* > > > > equivalents. > > > > > > > > > > We actually can't for compatibility reason. Some version of GLib have > > > broken macros and we still claim RHE

Re: [Spice-devel] [PATCH spice-common 1/2] quic: constantify some variable

2017-06-12 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > - Original Message - > > > > Signed-off-by: Frediano Ziglio > > > > --- > > > > common/quic.c | 6 +++--- > > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/common/quic.c b/common/quic.c > > > > inde

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Frediano Ziglio
> > Hi > > - Original Message - > > > > > > Hi > > > > > > - Original Message - > > > > The macro was misused and not doing static check. > > > > Spice have other working static check macros to use. > > > > The macro is used only by spice-common so removing it > > > > does not c

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > > > > Hi > > > > - Original Message - > > > The macro was misused and not doing static check. > > > Spice have other working static check macros to use. > > > The macro is used only by spice-common so removing it > > > does not cause issues to other depe

Re: [Spice-devel] [PATCH spice-common 1/2] quic: constantify some variable

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > > > > - Original Message - > > > Signed-off-by: Frediano Ziglio > > > --- > > > common/quic.c | 6 +++--- > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/common/quic.c b/common/quic.c > > > index 5b00d65..59565ae 100644 >

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Frediano Ziglio
> > Hi > > - Original Message - > > The macro was misused and not doing static check. > > Spice have other working static check macros to use. > > The macro is used only by spice-common so removing it > > does not cause issues to other depending projects. > > > > See also "[PATCH spice-

Re: [Spice-devel] [PATCH spice-common 1/2] quic: constantify some variable

2017-06-12 Thread Frediano Ziglio
> > - Original Message - > > Signed-off-by: Frediano Ziglio > > --- > > common/quic.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/common/quic.c b/common/quic.c > > index 5b00d65..59565ae 100644 > > --- a/common/quic.c > > +++ b/common/quic.c > >

[Spice-devel] unplug USB Device, guest Desktop will unresponsive

2017-06-12 Thread leaboy
hi, everyone. when I unplug a USB Storage from client machine, the guest desktop will unresponsive at thus case: 1. the USB Storage device with 16G or 32G has redir to the guest desktop, and coping some big file. then unplug the USB Storage device from the client machine. 2. when the U

Re: [Spice-devel] [PATCH spice-common 1/2] quic: constantify some variable

2017-06-12 Thread Marc-André Lureau
- Original Message - > Signed-off-by: Frediano Ziglio > --- > common/quic.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/common/quic.c b/common/quic.c > index 5b00d65..59565ae 100644 > --- a/common/quic.c > +++ b/common/quic.c > @@ -173,13 +173,13 @@ s

[Spice-devel] [PATCH spice-common] reuse {start, end}-packed headers to specify packed structure

2017-06-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/lz.c | 21 + common/quic.c | 24 +++- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/common/lz.c b/common/lz.c index 2589223..28f450b 100644 --- a/common/lz.c +++ b/common/lz.c @@ -382,30 +382,23

Re: [Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Marc-André Lureau
Hi - Original Message - > The macro was misused and not doing static check. > Spice have other working static check macros to use. > The macro is used only by spice-common so removing it > does not cause issues to other depending projects. > See also "[PATCH spice-common 1/4] log: replac

[Spice-devel] [PATCH spice-common 1/2] quic: constantify some variable

2017-06-12 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- common/quic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/quic.c b/common/quic.c index 5b00d65..59565ae 100644 --- a/common/quic.c +++ b/common/quic.c @@ -173,13 +173,13 @@ struct Encoder { }; /* target wait mask index */

[Spice-devel] [PATCH spice-common 2/2] log: remove spice_static_assert macro

2017-06-12 Thread Frediano Ziglio
The macro was misused and not doing static check. Spice have other working static check macros to use. The macro is used only by spice-common so removing it does not cause issues to other depending projects. Signed-off-by: Frediano Ziglio --- common/log.h | 5 - common/quic.c

Re: [Spice-devel] Ultra Wide resolution

2017-06-12 Thread Uri Lublin
On 06/10/2017 02:04 AM, guidu...@gmail.com wrote: Hi, I apologize if this is too basic but I am not very familiar with this topic. Anyway, I installed a new Fedora 25 guest, updated all packages, and vdagent package was already installed. Rebooted. After login the resolution was still 1024x768.

[Spice-devel] [PATCH spice-common 4/4] Add 'common_ssl' Spice log

2017-06-12 Thread marcandre . lureau
From: Marc-André Lureau Show usage of a Spice log category. Signed-off-by: Marc-André Lureau --- common/ssl_verify.c | 54 +++-- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/common/ssl_verify.c b/common/ssl_verify.c index 4b963

[Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

2017-06-12 Thread marcandre . lureau
From: Marc-André Lureau A log category is defined with SPICE_LOG_CATEGORY(). The macro will register a structure with a constructor (and unregister it on unloading with a destructor). spice_log_init() must be called at initialization time, to set enabled categories and add the 'Spice' glib domai

[Spice-devel] [PATCH spice-common 2/4] Replace spice_* logging with g_*

2017-06-12 Thread marcandre . lureau
From: Marc-André Lureau --- common/canvas_base.c| 148 - common/canvas_utils.c | 18 ++--- common/gdi_canvas.c | 82 +++ common/lz.c | 22 +++ common/lz_decompress_tmpl.c | 18 ++--- common/

[Spice-devel] [PATCH spice-common 1/4] log: replace spice log with glib

2017-06-12 Thread marcandre . lureau
From: Marc-André Lureau Remove all the deprecated spice log macro/environment variables facility in favour of glib. The following patches will bring some new log macro with "category" and structured logging. Signed-off-by: Marc-André Lureau --- common/log.c | 177 --

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

2017-06-12 Thread marcandre . lureau
From: Marc-André Lureau Hi, This is a RFC series to clean-up Spice logging infrastructure to fully rely on glib g_log & g_log_structured if available, and add logging categories. It is thus a counter-proposal to Christophe D. "RFC: Lightweight tracing mechanism", with which it shares the categor

Re: [Spice-devel] RFC: Lightweight tracing mechanism

2017-06-12 Thread Christophe de Dinechin
Top remark: here is what I expected to see discussed when I shared the code. 1. What categories do we want? 2. How do spread the categorization work? 3. How much do today’s developers depend on existing output? 4. What categories do we request e.g. in bug reports (IOW, what should --spice-debu