[Spice-devel] [spice-gtk v3 19/19] log: remove dup __FUNCTION__ argument from logs

2016-03-12 Thread Victor Toso
As this is included by default nowadays --- src/channel-base.c | 6 +++--- src/channel-cursor.c| 10 +- src/channel-display.c | 34 +- src/channel-inputs.c| 2 +- src/channel-main.c | 5 ++--- src/channel-playback.c | 12 ++--

[Spice-devel] [spice-gtk v3 17/19] Update spice-common submodule

2016-03-12 Thread Victor Toso
--- spice-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice-common b/spice-common index b61f43f..f99a7c6 16 --- a/spice-common +++ b/spice-common @@ -1 +1 @@ -Subproject commit b61f43f228950505ef809dccd6a73aefdfd44ce1 +Subproject commit f99a7c612e1ecf33e6e49f2a1e

[Spice-devel] [spice-common v3 03/19] log: allow filtering logs with subdomains

2016-03-12 Thread Victor Toso
Each .c file that want to use spice logging must include common/log.h and define its subdomain with SPICE_LOG_SUBDOMAIN_STATIC (name) helper. This static variable is initialized in its first use depending on SPICE_DEBUG env var. examples: - debug level for all subdomains export SPICE_DEBUG=6 exp

[Spice-devel] [spice-gtk v3 18/19] log: create subdomains for spice-gtk

2016-03-12 Thread Victor Toso
"audio" : spice-audio.c spice-gstaudio.c spice-pulse.c "base" : channel-base.c "channel": spice-channel.c "coroutine" : coroutine_gthread.c coroutine_ucontext.c coroutine_winfibers.c "cursor" : channel-cursor.c "decode" : decode-glz.c decode-jpeg.c decode-zlib

[Spice-devel] [spice-gtk v3 11/19] log: use spice_debug instead of g_debug

2016-03-12 Thread Victor Toso
--- src/giopipe.c | 8 src/spice-audio.c | 2 +- src/spice-channel.c | 10 +- src/spice-session.c | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/giopipe.c b/src/giopipe.c index d91c4d9..77de1cf 100644 --- a/src/giopipe.c +++ b/src/giopi

[Spice-devel] [spice-common v3 06/19] don't break the build with this wip patches

2016-03-12 Thread Victor Toso
--- tests/test-logging.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 94e923a..fcc63cc 100644 --- a/tests/test-logging.c +++ b/tests/test-logging.c @@ -19,11 +19,12 @@ #endif #define G_LOG_DOMAIN "Spice" -#define SPICE_

[Spice-devel] [spice-gtk v3 13/19] log: use spice_critical instead of g_critical

2016-03-12 Thread Victor Toso
--- src/channel-base.c | 6 ++--- src/channel-display-mjpeg.c | 2 +- src/channel-display.c | 2 +- src/channel-main.c | 4 +-- src/channel-usbredir.c | 2 +- src/spice-channel.c | 63 +++-- src/spice-grabsequence.c

[Spice-devel] [spice-gtk v3 16/19] log: use spice_error instead of g_error

2016-03-12 Thread Victor Toso
--- src/channel-usbredir.c| 2 +- src/coroutine_gthread.c | 2 +- src/coroutine_ucontext.c | 2 +- src/coroutine_winfibers.c | 4 ++-- src/usb-device-manager.c | 6 +++--- src/usb-device-widget.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/channel-usbredir.

[Spice-devel] [spice-gtk v3 14/19] log: use plain spice_debug instead of VNC_DEBUG

2016-03-12 Thread Victor Toso
--- src/vncdisplaykeymap.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/vncdisplaykeymap.c b/src/vncdisplaykeymap.c index e113981..7809ae4 100644 --- a/src/vncdisplaykeymap.c +++ b/src/vncdisplaykeymap.c @@ -17,10 +17,6 @@ #include "spice-util.h"

[Spice-devel] [spice-gtk v3 08/19] log: use spice_debug instead of SPICE_DEBUG

2016-03-12 Thread Victor Toso
Now that spice_debug is using glib log functions, there is no need to duplicate it with SPICE_DEBUG. Let's use the spice_debug as it also handles env var to better control the output. --- src/bio-gio.c| 2 +- src/channel-display.c| 24 +++ src/channel-main.c

[Spice-devel] [spice-gtk v3 09/19] log: nitpick at channel name in CHANNEL_DEBUG

2016-03-12 Thread Victor Toso
After moving to spice_debug, all logs are always prefixed with file name, function and line where CHANNEL_DEBUG was called. The channel-name now does not stand out as much as it should because name + colon is a common pattern. Enclosing the name between parentheses does help --- src/spice-channel-

[Spice-devel] [spice-common v3 04/19] log: create specific subdomains for filtering

2016-03-12 Thread Victor Toso
spice-common subdomains created in this patch are: "log": log.c, rop3.c (should be generic subdomain) "canvas" : canvas_utils.c and canvas_base.c "compression": lz.c, quic.c "memory" : mem.c "pixman" : pixman_utils.c "region" : region.c "ssl": ssl_verify.c --- commo

[Spice-devel] [spice-gtk v3 07/19] log: use glib logging on testing tools

2016-03-12 Thread Victor Toso
--- src/spicy-connect.c| 2 +- src/spicy-screenshot.c | 10 +- src/spicy-stats.c | 12 ++-- src/spicy.c| 34 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/spicy-connect.c b/src/spicy-connect.c index c47

[Spice-devel] [spice-common v3 05/19] log: Disable multiple domains in Spice

2016-03-12 Thread Victor Toso
Now that we can filter by subdomain, there is no need to allow multiple log domains within Spice code. --- common/log.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/log.h b/common/log.h index 64e6377..adc3749 100644 --- a/common/log.h +++ b/common/log.h @@ -26,9 +26,7 @@ SPICE_BE

[Spice-devel] [spice-gtk v3 15/19] log: use spice logging instead of (f)printf

2016-03-12 Thread Victor Toso
--- src/channel-cursor.c | 16 +++ src/coroutine_gthread.c| 4 +-- src/coroutine_ucontext.c | 2 +- src/coroutine_winfibers.c | 2 +- src/spice-channel.c| 50 -- src/spice-cl

[Spice-devel] [spice-gtk v3 10/19] log: remove unused SPICE_DEBUG

2016-03-12 Thread Victor Toso
--- src/spice-util.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/spice-util.h b/src/spice-util.h index f902c6e..26a2264 100644 --- a/src/spice-util.h +++ b/src/spice-util.h @@ -33,12 +33,6 @@ gulong spice_g_signal_connect_object(gpointer instance,

[Spice-devel] [spice-gtk v3 12/19] log: use spice_warning instead of g_warning

2016-03-12 Thread Victor Toso
--- src/bio-gio.c| 4 +-- src/channel-cursor.c | 6 ++-- src/channel-display.c| 6 ++-- src/channel-main.c | 8 ++--- src/channel-playback.c | 8 ++--- src/channel-record.c | 6 ++-- src/channel-smartcard.c | 4 +-- src/channel-us

[Spice-devel] [spice-common v3 02/19] log: include message log level for parity with glib

2016-03-12 Thread Victor Toso
--- common/log.c | 8 +--- common/log.h | 7 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/log.c b/common/log.c index 8d47cb6..9c2f2b2 100644 --- a/common/log.c +++ b/common/log.c @@ -43,15 +43,17 @@ static int abort_level = -1; static GLogLevelFlags spice_l

[Spice-devel] [spice-common v3] use specific subdomains for better filtering

2016-03-12 Thread Victor Toso
Hi! I've rebased this series and pushed to my remote branch in freedesktop [0] [1]. I'll try to clarify the ideia for working on this and if it does not get any positive feedback I'll take it as something not interesting to have... [0] (common) https://cgit.freedesktop.org/~victortoso/spice-common

[Spice-devel] [spice-common v3 01/19] log: simplify log defines with SPICE_LOG

2016-03-12 Thread Victor Toso
--- common/log.h | 59 --- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/common/log.h b/common/log.h index 0e03f59..68f11ca 100644 --- a/common/log.h +++ b/common/log.h @@ -47,47 +47,52 @@ void spice_log(const char *log_doma