源码编译并安装spice客户端,系统中会有一个简单用来测试的客户端程序spicy,我们只需要添加spice-debug命令参数,就可以看到客户端spicy的所有调试信息了,并且我们也可以在代码中使用封装好的调试信息输出接口,添加调试信息。
[root@localhost ~]# spicy --spice-debug
(spicy:98799): GSpice-DEBUG: spice-session.c:160 New session (compiled from package spice-gtk 0.26)
(spicy:98799): GSpice-DEBUG: spice-session.c:164 Supported channels: main, display, inputs, cursor, playback, record, smartcard, usbredir
(spicy:98799): GSpice-DEBUG: usb-device-manager.c:874 device added 0x2a76c90
(spicy:98799): GSpice-DEBUG: spicy.c:1733 connection_new (1)
(spicy:98799): GLib-GObject-WARNING **: g_object_get_valist: object class 'SpiceSession' has no property named 'unix-path'
(spicy:98799): GSpice-DEBUG: spicy-connect.c:177 spicy_connect_dialog: #0 [host]: "localhost"
(spicy:98799): GSpice-DEBUG: spicy-connect.c:177 spicy_connect_dialog: #1 [port]: "(null)"
(spicy:98799): GSpice-DEBUG: spicy-connect.c:177 spicy_connect_dialog: #2 [tls-port]: "(null)"
如果想要把调试信息全部输出到/root/spicedbg文件中,那么需要如下执行:
[root@localhost ~]# spicy --spice-debug 1>/root/spicedbg 2>&1